I've got test xml file that looks like this:
<Person>
<ContactInfo>
...
<ContactInfo>
</Person>
When I'm trying to deserialize, everything works fine. But the problem is that sometimes the structure of this xml file is different - xml namespaces are added sometimes.
<Person xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<ContactInfo>
...
<ContactInfo>
</Person>
And now when I'm serializing, I get IOnvalidOperationException: "There is an error in XML document (1, 2)". The inner exception message says <Person xmlns='http://tempuri.org/PaymentInformationXml.xsd'> was not expected.
So could anyone help me with this?