Thanks Rob. You're right it is not very intuitive since people usually think of an XML document as a physical file on the hard disck. The fact of the matter is, XML documents can also be represented as in-memory strings and the parser doesn't really care!
I use DOM tree dumps to create "snapshots" of an XML document for crash recovery. The document writes itself after every mutation while it undergoes in-memory transistions. This way if something bad happens( say your computer crashes ), all you have lost is just one transition.
Cheers!
------------------
Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.