WriteXML - Element Names differ from Column Names???

joker77

Active member
Joined
Sep 16, 2005
Messages
38
Location
Dublin
Hi, Im not sure if this is the correct Forum for this thread, so if any Mods would like to move it?

Im new enough to .NET, and am starting to work with WriteXML. Ive created a Dataset, created a new table, created a row object, added the columns to the row, created a new row for the table as my defined row, and added 1 row of data.

From here, I want to use the WriteXML.

Ive done this specifying the dataset and the table name, and the file was saved successfully.

When I open up the XML file though, the Element Names in the XML do not match the Column Names in the Table, specifically the Column Names that start with a number 0, have been changed.
E.g. Column Name -> 0800M with value Gallagher, has been changed to Element -> <_x0030_800M>Gallagher</_x0030_800M>

Where does this _x0030_ come from????

I amended the Column names so that the first letter was not numeric, i.e. changing column 0800M, to T0800M, and the XML Element Name created after doing a WriteXML was T0800M, which leads me to believe that its definitely something to do with the first letter being numeric.

Slightly annoying.................
 
Back
Top