drupal stats

Data Access

Export DataTable or DataSet to XML

Export DataSet to XML

DataSet ds = new DataSet();

ds = _customers.GetCustomers();

ds.WriteXml("D:\\Customers.xml", System.Data.XmlWriteMode.IgnoreSchema);

 

Export DataTable to XML

DataTable dt = new DataTable();

dt = _customers.GetCustomers();

DataSet ds = new DataSet();

ds.Tables.Add(dt);

ds.WriteXml("D:\\Customers.xml", System.Data.XmlWriteMode.IgnoreSchema);