How to Save DataSet as XML Document


If you want to save data from DataSet into XML Document you can use WriteXml method as follows:

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

If you just want to save Schema information not data you can use WriteXmlSchema method.

ds.WriteXmlSchema("C:\\Employees.xsd");



 

 

About author


User avatar

Waqas Anwar

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

Comments