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
 
Back
Top