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