Skip to main content

Constructing DOM using StAX Writers

No replies
kohsuke
Offline
Joined: 2003-06-09

from http://blogs.sun.com/roller/page/venu?entry=constructing_dom_using_stax_...
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.