Skip to main content

Constructing DOM using StAX Writers

No replies
Joined: 2003-06-09

I recently added support for createXMLStreamWriter(DOMResult result) method in SJSXP. It is of great use where implementations spit out XML documents to a StreamWriter and you want to construct a DOM tree instead of dumping it to the OuputStream. Following code snippet shows how to create a StAX writer that builds a Document.