How to define multiple names for XmlElement field?
I have a XML document provided by client applications to my C# application. This is how a client sends the XML file: <?xml version="1.0" encoding="utf-8"?> <SomeAccount> <parentId>2380983</parentId> <!-- more elements --> </SomeAccount> And a C# class that supports the XML deserialization: [XmlRoot] public class SomeAccount { [XmlElement("parentId")] public long ParentId { get; set; } //rest of fields... } But there are some clients whose system send the XML in this way (note the upper case in LeParentId ): <?xml version="1.0" encoding="utf-8"?> <SomeAccount> <LeParentId>2380983</LeParentId> <