I have the following class:
[Serializable]
public class SomeModel
{
[XmlElement("CustomerName")]
public string CustomerName { get; set; }
[XmlElement("")]
public int CustomerAge { get; set; }
}
Which (when populated with some test data) and Serialized using XmlSerializer.Serialize() results in the following XML:
<SomeModel>
<CustomerName>John</CustomerName>
<CustomerAge>55</CustomerAge>
</SomeModel>
What I need to have is:
<SomeModel>
<CustomerName>John</CustomerName>
55
</SomeModel>
Meaning for the 2nd xmlelement, it should not have its own tag. Is this even possible? Thank you.