I using a dataset to read an xml file as shown below
DataSet ds = new DataSet();
ds.ReadXml(“C:\test.xml”);
test.xml contains
<MasterEntities>
<FieldInfo>
<Name>OMID</Name>
<Mandatory>Yes</Mandatory>
<RangeName>AssumptOMID</RangeName>
<DataType>int</DataType>
<Length>10</Length>
</FieldInfo>
<FieldInfo>
<Name>ClientName</Name>
<Mandatory>Yes</Mandatory>
<RangeName>AssumptClient</RangeName>
<DataType>string</DataType>
<Length>50</Length>
</FieldInfo>
<FieldInfo>
<Name>OppName</Name>
<Mandatory>Yes</Mandatory>
<RangeName>AssumptProjectName</RangeName>
<DataType>string</DataType>
<Length>50</Length>
</FieldInfo>
<Settings>
<somesetting1></somesetting1>
<somesetting2></somesetting2>
</Settings>
</MasterEntities>
now i want to read fieldInfo in one dataset/datatable and settings in another dataset/datatable
Please help me with the code
Here’s a toy app that does that same thing, and shows the tables in the DataSet in a tree – and the contents of the table in a grid … handy for seeing what’s in a simple XML file …
http://www.dot-dash-dot.com/files/WTFXMLSetup_1_8_0.msi.
Source to the VB.NET project if you want it … http://www.dot-dash-dot.com/files/wtfxml.zip