Isn't that the same as writing a text file or HTML file? Are you sure you are dealing with an XML file which is just a text file?

"Dynamic" XML? Are you sure you don't mean DHTML?

Okay, at least one person (or company--IBM) is putting the word "dynamic" before "XML".
http://www.alphaworks.ibm.com/formula/dynamicxmlforjava

But then again, they define something new called DXMLJ, not XML per se.