Open bcichonski opened 7 years ago
Questions to consider:
Can be done using DotNetSerializer
https://dotnetfiddle.net/pMfHrM - code not working because namespace System.Xml.*
is not available.
I think that to achieve maximum consistency it will be best to extend SerializeAs
and DeserializeAs
attributes with another property Content = true.
SerializeAs(Content = true)
attribute and handling in XmlSerializer
SerializeAs(Content = true)
(min two cases)DeserializeAs(Content = true)
attribute and handling in XmlDeserializer
DeserializeAs(Content = true)
(min two cases)
It seems to me that when using default XmlSerializer there is no way to produce xml node that has attribute values and text content at the same time. This was originally found when my team was using RestSharp for communicating with Prestashop 1.6 API, where some nodes should look like: