Reading xml attibute using dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i am trying to read the following xml in asp.net using C#.I want a mechanism to read the value of id (xxx) and also the value itself (sam
<?xml version="1.0" standalone="yes"?><root><buglist><Bugid>1</Bugid><version>5.0</version><description id ="xxx">sam</description><reported_by>Dallas</reported_by></buglist></root

DataSet d = new DataSet()
FileStream myFs = new FileStream("E:\\webapps\\dbbuglist\\test1.xml",FileMode.Open,FileAccess.Read)
d.ReadXml(myFs)

foreach(DataRow myRow in d.Tables["buglist"].Rows


Label1.Text= Int32.Parse((myRow["Bugid"].ToString()));
Label2.Text= Int32.Parse((myRow["version"].ToString()));

Label3.Text= read description ??
Label4.Text= read id ???

Label5.Text= Int32.Parse((myRow["reported_by"].ToString()));



I get an error when i read the descrption node. can you help me get this up on running.
 
Back
Top