Convert DataTable to Xml and Vice-Versa
Convert DataTable to Xml and Vice-Versa protected void Page_Load( object sender, EventArgs e) { DataTable dt = DtTable(); string change = ConvertDatatableToXML(dt); DataTable dtret = ConvertXMLtoDataTable(change); } public string ConvertDatatableToXML( DataTable dt) { MemoryStream str = new MemoryStream (); dt.WriteXml(str, true ); str.Seek(0, SeekOrigin .Begin); StreamReader sr = new StreamReader (str); string xmlstr; xmlstr = sr.ReadToEnd(); ...