Hi,
I am trying to get a xml file into a dataset and am using the following code:
DataSet ds = new DataSet("TestDataSet");
ds.ReadXml(FileName);
and this xml file:
<Catalog>
<Rec>
<ITEM dt:dt="string"/>
<QTY dt:dt="string">1</QTY>
<SUB dt:dt="string">1</SUB>
<CATALOG dt:dt="string">ABC123</CATALOG>
</Rec>
<Rec>
<ITEM dt:dt="string"/>
<QTY dt:dt="string">1</QTY>
<SUB dt:dt="string">1</SUB>
<CATALOG dt:dt="string">ABC124</CATALOG>
</Rec>
<Rec>
<ITEM dt:dt="string"/>
<QTY dt:dt="string">1</QTY>
<SUB dt:dt="string">1</SUB>
<CATALOG dt:dt="string">ABC125</CATALOG>
</Rec>
</Catalog>
The trouble is that the after setting a watch on ds, it only appears to contain a table called Rec and a column called Rec_Id. If I remove the "dt:dt="String"" datatype everything works fine.
I am using C#.net 2008...
Can someone please advise of the correct way to import this data without having to alter the xml file?
Thanks