BeanSoftware Logo
 

 
ASP.NET Database Search Control
 
 

 
 Home
    Shop
    Advertise
    Write For Us
    Affiliate
    Newsletter
    Contact

How To Write XML File From DataSet or DataTable?

It is very easy to create XML file filled with data from DataSet or DataTable object. Let say that you already filled DataSet object, named MyDataSet, with some data from database. Code to write XML file would be:

[ C# ]

MyDataSet.WriteXml(Server.MapPath("XMLFiles/MyXMLFile.xml"));

[ VB.NET ]

MyDataSet.WriteXml(Server.MapPath("XMLFiles/MyXMLFile.xml"))

 

On the same way, by using WriteXML property you can create an XML file from DataTable object.



Related articles:

1. Using ASP.NET With SQL Server

FAQ toolbar: Submit FAQ  |  Tell A Friend  |  Add to favorites  |  Feedback



Copyright © 2002-2008 Bean Software. All rights reserved.