I am trying to load XML into a Dataset using DataSet.ReadXML( ) method.
Encountering the below error -
System.InvalidOperationException: Nested table ‘Address’ which inherits its namespace cannot have multiple parent tables in different namespaces
XML is retrieved from a third party and these are a few notable points :
1 ) The "Address" type is present as child elements at various levels like Email, contact etc. While some of these child elements are of simple type & have "type=string" , the others refer to a "type=nis:Address" where nis:address is given by (as below) -
<element name="AddressTypeCode" type="nis:AddressTypeCodeType" />
<element name="Address" type="string" />
<element name="IsPreferred" type="nis:Boolean" />
<attribute use="required" ref="nis:referenceNumber" />
2) The third party says they are generating the XML under a single namespace and it works fine on a PHP parser. I am using C#.
3) I have tried the XmlReadMode.IgnoreSchema , though the error is not seen then , the dataset retreived is empty.
Any suggestion how I can work this around?