Home > C#, XML > Load DataSet from xml file.

Load DataSet from xml file.

Load DataSet from xml file:

The file is called users.xml. The example structure of xml file is:

<users>
  <user>
    <name>My Name</name>
  </user>
</users>

Code to load xml file into DataSet:

DataSet ds = new DataSet("user");
...
string filePath = "users.xml";
ds.ReadXml(filePath);

The value of the filePath is the full path to the file users.xml.


Unique visitors to post: 33

Categories: C#, XML Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.
Google Analytics integration offered by Wordpress Google Analytics Plugin