XML to DataSet - Nested table /Multiple inheritence Error

Hi,

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="Address">
            <complextype>
                  <sequence>
                        <element name="AddressTypeCode" type="nis:AddressTypeCodeType" />
                        <element name="Address" type="string" />
                        <element name="IsPreferred" type="nis:Boolean" />
                  </sequence>
                  <attribute use="required" ref="nis:referenceNumber" />
            </complextype>
      </element>

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?
Best.,



LVL 1
charge22Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
You might have to go in a different direction from DataSet.ReadXml.  What version of .NET are you using?
0
charge22Author Commented:
.Net Frame work  3.5 on VS 2008
0
Bob LearnedCommented:
Great!!  I am current looking at the LINQ-to-XSD project, where you can create classes from .xsd schema files:

LINQ to Everything - LINQ to XSD adds more LINQiness
http://www.hanselman.com/blog/LINQToEverythingLINQToXSDAddsMoreLINQiness.aspx
0
Tommy11bCommented:
Two questions,
01) can you attach an example file so I can take a shot at it?
02) Are you trying to read into a Typed or Untyped dataset?
0
charge22Author Commented:
Hello,

Thank you Tommy11b & TheLearnedOne for your help.This turned out to be a Data issue from third party vendor.Now sorted. Thank you again.

rgds
Deepti
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.