How to Read XML Document or XML Schema in DataSet


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");

 

 

About author


User avatar

Waqas Anwar

Founder of EzzyLearning.com, Senior Consultant, Microsoft .NET and Web Technologies

Comments