XML in C#

  • Thread starter Thread starter Germic
  • Start date Start date
G

Germic

</list>

<array>

<Name>

<first> John </first>

<second> Joseph </second>

</Name>

</Course>

<major> Computers </major>

<minor> Biology </minor>

</Course>

</array>

.....<array>....</array>.....

</list>



After presisting this xml to a dataset, how is it possible to access the
node first, second and major,minor?

(

foreach (DataRow dr in ds.Tables[0].Rows){

Console.WriteLine(Convert.ToString(dr["first"]); .....?


Also, Is it better/efficient to persist the XML data to a dataset and then
parse it or to a XMLDocument?



Thanks
 
Looks like it is better if you use XmlDocument for this as you wanted
to access individual node.
 
Back
Top