|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.transform.sax.SAXResult
javanet.staxutils.StAXResult
A JAXP Result
implementation that produces
a result on the specified XMLStreamWriter
or
XMLEventWriter
.
Please note that you may need to call flush() on the underlying XMLStreamWriter or XMLEventWriter after the transform is complete.
The fact that JAXBResult derives from SAXResult is an implementation detail. Thus in general applications are strongly discouraged from accessing methods defined on SAXResult.
In particular it shall never attempt to call the following methods:
Example:
// create a DOMSource Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(...); Source domSource = new DOMSource(doc); // create a StAXResult XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out); Result staxResult = new StAXResult(writer); // run the transform TransformerFactory.newInstance().newTransformer().transform(domSource, staxResult);
Field Summary |
Fields inherited from class javax.xml.transform.sax.SAXResult |
FEATURE |
Fields inherited from interface javax.xml.transform.Result |
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING |
Constructor Summary | |
StAXResult(XMLEventWriter writer)
Create a new Result that produces
a result on the specified XMLEventWriter |
|
StAXResult(XMLStreamWriter writer)
Create a new Result that produces
a result on the specified XMLStreamWriter |
Methods inherited from class javax.xml.transform.sax.SAXResult |
getHandler, getLexicalHandler, getSystemId, setHandler, setLexicalHandler, setSystemId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StAXResult(XMLStreamWriter writer)
Result
that produces
a result on the specified XMLStreamWriter
writer
- the XMLStreamWriter
java.lang.IllegalArgumentException
- iff the writer is nullpublic StAXResult(XMLEventWriter writer)
Result
that produces
a result on the specified XMLEventWriter
writer
- the XMLEventWriter
java.lang.IllegalArgumentException
- iff the writer is null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |