Create(Map Path("file.xml")) // how check well Formed variable here to decide if XML is well-formed or not A Data Set can deal with certain types of XML that can be mapped to tables and rows, it can't deal with arbitrary XML.

It still fails even with the schema properly written through the Xml Writer.

One solution and probably the cleanest at that is to modify the schema to automatically default to the preserve setting: and then simply don't generate the tag.

The document type (DOCTYPE) declaration consists of an internal, or references an external Document Type Definition (DTD).

It can also have a combination of both internal and external DTDs.

The DTD defines the constraints on the structure of an XML document.

It declares all of the document's element types, children element types, and the order and number of each element type.

coz when you save the file it only saves the new nodes written in it.it will lose all of the comment nodes..

you have to take care of the comment nodes as well...

I checked this out with two-way conversion - saving values with spaces and exporting to Resx checking for the spaces still being in the XML (they are) and then round tripping the data back into the Resource Provider and double checking the value to ensure that the spaces have made it (they do).