Hi,
I have an XML file I need to dump the data in 4 different tables. Can any one please provide the C# code to achieve this.
Regards,
MZEE
Hi,
I have an XML file I need to dump the data in 4 different tables. Can any one please provide the C# code to achieve this.
Regards,
MZEE
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Virus KiraakPosted Jul 15, 2012, 6:52 AM
Regards, MZEE
Santhosh Kumar JayaramanPosted Jul 15, 2012, 5:13 AM
//the path in which XML file is saved
string path = "D:\\Santhosh\\XMLFile1.xml";
DataSet ds=new DataSet();
//Reading XML file and copying to dataset
ds.ReadXml(path);
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "table1";
you can read more in the below article.
http://www.c-sharpcorner.com/UploadFile/1a81c5/populating-values-from-xml-to-gridview-and-from-gridview-to/