I am trying to write a data table to xml and again reading it back to my application.
This is the structure of my DataTable ---> Note : It is having a column of DataTable type.
DataTable _clsdatatable = new DataTable();
_clsdatatable.Columns.Add("WIZARDID", typeof(int));
_clsdatatable.Columns.Add("WIZARD_NAME", typeof(string));
_clsdatatable.Columns.Add("WIZARD_TYPE", typeof(string));
_clsdatatable.Columns.Add("CREATE_DATE", typeof(DateTime));
_clsdatatable.Columns.Add("UPDATE_DATE", typeof(DateTime));
_clsdatatable.Columns.Add("USERID", typeof(short));
_clsdatatable.Columns.Add("WIZARD_DATA", typeof(DataTable));
Now if I try to export this data table to XML, I am getting a complex xml with so many diffgram data and schema details.
Now if I try to read the xml it is giving me error as
Column 'WIZARDID' does not belong to table Wizard.
If there is no data table present in the parent data table then it is working fine both > write and read case. So seems like the problem is with writing XML process while Data table is present inside data table.
Please let me know if anybody can help me with this --- Is there any way to attach the xml file with the post --- then it would be helpful for you gyus.