XML Deserialization issues for elements without values but has attributes


New Member
I have the following xml:\[code\]<employment_details> <first_name>John</first_name> <last_name>L</last_name> <marital_status type="single"/> <location>CA</location></employment_details>\[/code\]Deserialization using XMLSerializer has issues. The elements first_name, last_name and marital_status gets deserialized correctly. The element location does not get deserialized, it shows null. Any element after an element with attributes and no values is not getting deserialized. Please suggest.But everything deserializes correctly, if the element marital_status is placed at the end like:\[code\]<employment_details> <first_name>John</first_name> <last_name>L</last_name> <location>CA</location> <marital_status type="single"/></employment_details>\[/code\]