Amritha Chand


I am creating an application which requires the data to be read from an XML file. So i read the file to a dataSet.

My XML file is like

<B ID="xxx">

<C IsLocked="-1" Id="1|xxx" >


<E Id="workid">1</E >

<E Id="busy">0</E >


</C >


<B ID="xxx">

<C IsLocked="-1" Id="2|xxx" >


<E Id="workid">2</E >

<E Id="busy">0</E >


</C >


So when i load it to dataset i got 4tables one for each node.

table0- B

table 1- C likewise.

My problem is i want to get the workid of node E seperately.

ie, When i call a function to get the WorkItem, i shd get the wiorkid= 1 at first.

By next call i shd get the workId -2 from E node..

Since in the 4th table of dataset(table 3- E), I get all the fields..


Table E

id Text DId

workId 1 0

busy 0 0

workId 2 1

busy 0 1

Did is the filed which connects node E to node D.

So in the first call of function GetWorkItem(), i want to get the workId 1

Can anyone plz help me in this issue...

Thanks in advance.

Re: Windows Forms General Issue with Dataset while reading from XML

Gavin Jin - MSFT


The contents of an ADO.NET DataSet can be created from an XML stream or document. In addition, with the .NET Framework you have great flexibility over what information is loaded from XML, and how the schema or relational structure of the DataSet is created.

To fill a DataSet with data from XML, use the ReadXml method of the DataSet object. The ReadXml method will read from a file, a stream, or an XmlReader, and takes as arguments the source of the XML plus an optional XmlReadMode argument. (For more information about the XmlReader, see Reading XML Data with XmlTextReader.) The ReadXml method reads the contents of the XML stream or document and loads the DataSet with data. It will also create the relational schema of the DataSet depending on the XmlReadMode specified and whether or not a relational schema already exists.

For more information £¨please check following articles

With Regards