string to xml file on disk

  • Thread starter Thread starter Hykii Malakki
  • Start date Start date
H

Hykii Malakki

What is a good way to take many string variable and write/append their data
to well-formed xml file on disk?
 
XmlTextWriter xmlwr= new XmlTextWriter("c:\\cc.xml",Encoding.ASCII);
XmlDocument doc = new XmlDocument();

doc.loadXml(yourxmlString);
doc.WriteTo(xmlwr);


pei_world
 
why not simply use doc.save(Filename)
I don´t see the advantage of the XMLWriter here, when you have the complete DOM parsed or am I wrong

Mf

Marti

----- pei_world wrote: ----

XmlTextWriter xmlwr= new XmlTextWriter("c:\\cc.xml",Encoding.ASCII)
XmlDocument doc = new XmlDocument()

doc.loadXml(yourxmlString)
doc.WriteTo(xmlwr)


pei_worl
 

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

Back
Top