how to specify what format Dataset uses to write xml

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
 
M

Miha Markic [MVP C#]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top