A frequent question is "Okay, I have a DOM, and I made some changes to it, now how do I write it out to an XML file?"
Here's a method that does that for a given org.w3c.dom.Node object (usually an instance of org.w3c.dom.Element or org.w3c.dom.Document):
(See also
DocumentToString)
XmlFaq CategoryCodeSamples