How to Read XML Document or XML Schema in DataSet

Waqas Anwar
09 June 2009
4560 Views

If you want to load XML document into your DataSet object you can use ReadXml method as follows:

DataSet ds = new DataSet();

ds.ReadXml("C:\\Employees.xml");

To read just the Schema into your DataSet object you can use ReadXmlSchema method of DataSet class
ds.ReadXmlSchema("C:\\Employees.xsd");