Class StAXStreamWriter

java.lang.Object
org.jdom2.input.StAXStreamWriter
All Implemented Interfaces:
XMLStreamWriter

public class StAXStreamWriter extends Object implements XMLStreamWriter
An XMLStreamWriter implementation that writes XML data to a new JDOM Document. The document can be retrieved using getDocument().

This class is the inverse of the class StAXStreamBuilder in the sense that this class is written to (it's an XMLStreamWriter implementation) to create a JDOM Document whereas the StAXStreamBuilder reads from a user-supplied XMLStreamReader. It is the difference between a 'push' concept and a 'pull' concept.

An interesting read for people using this class: Apache Axiom notes on setPrefix().

Since:
JDOM 2.1
Author:
gordon burgett https://github.com/gburgett, Rolf Lear