Package org.jvnet.staxex.util
Class XMLStreamReaderToXMLStreamWriter
java.lang.Object
org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter
- Direct Known Subclasses:
ManagementWSDLPatcher,WSDLPatcher
Reads a sub-tree from
XMLStreamReader and writes to XMLStreamWriter
as-is.
This class can be sub-classed to implement a simple transformation logic.
- Author:
- Kohsuke Kawaguchi, Ryan Shoemaker
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbridge(XMLStreamReader in, XMLStreamWriter out) Reads one subtree and writes it out.voidbridge(XMLStreamReaderToXMLStreamWriter.Breakpoint breakPoint) protected voidhandleAttribute(int i) Writes out thei-th attribute of the current element.protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidhandlePI()protected voidprotected void
-
Field Details
-
in
-
out
-
-
Constructor Details
-
XMLStreamReaderToXMLStreamWriter
public XMLStreamReaderToXMLStreamWriter()
-
-
Method Details
-
bridge
Reads one subtree and writes it out.The
XMLStreamWriternever receives a start/end document event. Those need to be written separately by the caller.- Throws:
XMLStreamException
-
bridge
public void bridge(XMLStreamReaderToXMLStreamWriter.Breakpoint breakPoint) throws XMLStreamException - Throws:
XMLStreamException
-
handlePI
- Throws:
XMLStreamException
-
handleCharacters
- Throws:
XMLStreamException
-
handleEndElement
- Throws:
XMLStreamException
-
handleStartElement
- Throws:
XMLStreamException
-
handleAttribute
Writes out thei-th attribute of the current element.Used from
handleStartElement().- Throws:
XMLStreamException
-
handleDTD
- Throws:
XMLStreamException
-
handleComment
- Throws:
XMLStreamException
-
handleEntityReference
- Throws:
XMLStreamException
-
handleSpace
- Throws:
XMLStreamException
-
handleCDATA
- Throws:
XMLStreamException
-