Looping through a dataset that hsa been filled with an XML document

Mar 4 2004 5:53 PM
Hi, I am trying to read in and parse an XML document so that I can enter the data to a SQL database. I have gotten this far: private void button2_Click(object sender, System.EventArgs e) { DataSet myDataSet = new DataSet(); myDataSet.ReadXml("c:\\test1.xml"); foreach(DataTable dt in myDataSet.Tables) { Console.WriteLine("Table Name : {0}",dt.TableName); foreach(DataColumn dc in dt.Columns) { Console.WriteLine("Column : {0}",dc.ColumnName); } } } Is there any way to read the values from the dataset? Thanks,

Answers (2)