how to specify what format Dataset uses to write xml

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on generating xml file from dataset using the following statement

datasetName.WriteXml("c:\\dotnet\\cs\\notifyMessageTest.txt", XmlWriteMode.IgnoreSchema);

...Net generates <?xml version="1.0" standalone="yes"?> as the first line.

Is there any smart way to get rid of this line because the third party
package cannot process xml file with this line. They do not use schema.

thanks in advance
 
OTOH you could write to StringWriter (for example), strip the first line and
only then store to file on disk.
Let me know if you need more info on this.
 
Back
Top