XMLEventReader2, the
extended stream reader defined by Stax2 extension, by wrapping
a vanilla Stax 1.0 XMLEventReader implementation.
Note: the implementation may be incomplete as-is, since not all features needed are necessarily accessible via basic Stax 1.0 interface. As such, two main use cases for this wrapper are:
| Modifier and Type | Field and Description |
|---|---|
| protected final XMLEventReader |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements javax. |
| public String | getElementText()
Implements javax. |
| public Object | getProperty(String
The name of the property name)Implements javax. |
| public boolean | |
| public boolean | hasNextEvent()
Implements org. hasNext, except that it can
throw a XMLStreamException.
|
| public boolean | isPropertySupported(String name)
Implements org. javax., used
to determine whether a property is supported by the Reader
instance.
|
| public Object | |
| public XMLEvent | |
| public XMLEvent | nextTag()
Implements javax. |
| public XMLEvent | peek()
Implements javax. |
| public void | remove()
Overrides default java. Note only here because we implement Iterator interface. |
| public boolean | setProperty(String
Name of the property to set name, Object Value to set property to. value)Implements org. org.
instance.
|
| public static XMLEventReader2 | wrapIfNecessary(XMLEventReader er)
Method that should be used to add dynamic support for
|
| mReader | back to summary |
|---|---|
| protected final XMLEventReader mReader | |
| Stax2EventReaderAdapter | back to summary |
|---|---|
| protected Stax2EventReaderAdapter(XMLEventReader er) | |
| close | back to summary |
|---|---|
| public void close() throws XMLStreamException Implements javax. Doc from javax. Frees any resources associated with this Reader. This method does not close the underlying input source.
| |
| getElementText | back to summary |
|---|---|
| public String getElementText() throws XMLStreamException Implements javax. Doc from javax. Reads the content of a text-only element. Precondition: the current event is START_ELEMENT. Postcondition: The current event is the corresponding END_ELEMENT.
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) Implements javax. Doc from javax. Get the value of a feature/property from the underlying implementation | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements javax. Doc from javax. Check if there are more events. Returns true if there are more events and false otherwise.
| |
| hasNextEvent | back to summary |
|---|---|
| public boolean hasNextEvent() throws XMLStreamException Implements org. Doc from org. Method that is similar to
| |
| isPropertySupported | back to summary |
|---|---|
| public boolean isPropertySupported(String name) Implements org. Doc from org. Method similar to
| |
| next | back to summary |
|---|---|
| public Object next() Implements java. Doc from java. Returns the next element in the iteration. | |
| nextEvent | back to summary |
|---|---|
| public XMLEvent nextEvent() throws XMLStreamException Implements javax. Doc from javax. Gets the next XMLEvent. The initial event is
| |
| nextTag | back to summary |
|---|---|
| public XMLEvent nextTag() throws XMLStreamException Implements javax. Doc from javax. Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached. If anything other than space characters are encountered, an exception is thrown. This method should be used when processing element-only content because the parser is not able to recognize ignorable whitespace if the DTD is missing or not interpreted.
| |
| peek | back to summary |
|---|---|
| public XMLEvent peek() throws XMLStreamException Implements javax. Doc from javax. Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next().
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Note only here because we implement Iterator interface.
| |
| setProperty | back to summary |
|---|---|
| public boolean setProperty(String name, Object value) Implements org. Doc from org. Method that can be used to set per-reader properties; a subset of
properties one can set via matching
| |
| wrapIfNecessary | back to summary |
|---|---|
| public static XMLEventReader2 wrapIfNecessary(XMLEventReader er) Method that should be used to add dynamic support for
| |