Result tagging interface for StAX writers. Can be constructed with
an XMLEventConsumer or an XMLStreamWriter.
This class is necessary because there is no implementation of Source for StaxReaders
in JAXP 1.3. There is a StAXResult in JAXP 1.4 (JDK 1.6), but this class is kept around
for backwards compatibility reasons.
Even though StaxResult extends from SAXResult, calling the methods of
SAXResult is not supported. In general, the only supported operation
on this class is to use the ContentHandler obtained via getHandler() to parse an
input source using an XMLReader. Calling setHandler(org.
or setLexicalHandler(org. will result in
UnsupportedOperationExceptions.
XMLEventWriter, XMLStreamWriter, javax.xml.transform.Transformer
| Modifier and Type | Field and Description |
|---|---|
| private XMLEventWriter | |
| private XMLStreamWriter |
| Access | Constructor and Description |
|---|---|
| public | StaxResult(XMLEventWriter
the eventWriter)XMLEventWriter to write toConstruct a new instance of the |
| public | StaxResult(XMLStreamWriter
the streamWriter)XMLStreamWriter to write toConstruct a new instance of the |
| Modifier and Type | Method and Description |
|---|---|
| public XMLEventWriter | Returns: the StAX event writer used by this resultReturn the |
| public XMLStreamWriter | Returns: the StAX stream writer used by this resultReturn the |
| public void | setHandler(ContentHandler
Must be a non-null ContentHandler reference. handler)Overrides javax. Throws an |
| public void | setLexicalHandler(LexicalHandler
A non-null handler)LexicalHandler for
handling lexical parse events.Overrides javax. Throws an |
| eventWriter | back to summary |
|---|---|
| private XMLEventWriter eventWriter
| |
| streamWriter | back to summary |
|---|---|
| private XMLStreamWriter streamWriter
| |
| StaxResult | back to summary |
|---|---|
| public StaxResult(XMLEventWriter eventWriter) Construct a new instance of the
| |
| StaxResult | back to summary |
|---|---|
| public StaxResult(XMLStreamWriter streamWriter) Construct a new instance of the
| |
| getXMLEventWriter | back to summary |
|---|---|
| public XMLEventWriter getXMLEventWriter() Return the If this
| |
| getXMLStreamWriter | back to summary |
|---|---|
| public XMLStreamWriter getXMLStreamWriter() Return the If this
| |
| setHandler | back to summary |
|---|---|
| public void setHandler(ContentHandler handler) Overrides javax. Throws an
| |
| setLexicalHandler | back to summary |
|---|---|
| public void setLexicalHandler(LexicalHandler handler) Overrides javax. Throws an
| |