Strange result from C#'s DataSet WriteXML conversion

jonesmelon

New Member
I have written the following code to extract some queries and convert the result into XML file.\[code\]OdbcConnection conn = new OdbcConnection(args[0]);OdbcDataAdapter da = new OdbcDataAdapter();conn.Open();da.SelectCommand = new OdbcCommand(args[1], conn);DataSet ds = new DataSet();da.Fill(ds);ds.WriteXml("iDA.XML");\[/code\]However I'm getting the following which is not exactly how I want the data to look like. I don't know where the "x0000" at the start and end of each element come from and or the " xml:space="preserve" come from. Any ideas?\[code\]<so_bo_suffix_x0000_ xml:space="preserve"></so_bo_suffix_x0000_> <so_processing_date_x0000_>2012-07-08T00:00:00+10:00</so_processing_date_x0000_> \[/code\]Unfortunately I wouldn't be able to put more info on, however, I can tell you in regards to the above couple of lines, the data SHOULD look like the following respectively. This is from a similar application which runs the same queries.\[code\]<so_bo_suffix> </so_bo_suffix><so_processing_date>17/04/2012 12:00:00 AM</so_processing_date><so_processing_date>17/04/2012 12:00:00 AM</so_processing_date>\[/code\]Thanks
 
Back
Top