public class StAXEventReader extends Object implements XMLEventReader
Modifier and Type | Field and Description |
---|---|
protected XMLEventAllocator |
_eventAllocator |
protected XMLStreamReader |
_streamReader |
Constructor and Description |
---|
StAXEventReader(XMLStreamReader reader) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getElementText()
Reads the content of a text-only element.
|
Object |
getProperty(String name)
Get the value of a feature/property from the underlying implementation
|
boolean |
hasNext() |
Object |
next() |
XMLEvent |
nextEvent() |
XMLEvent |
nextTag()
Skips any insignificant space events until a START_ELEMENT or
END_ELEMENT is reached.
|
XMLEvent |
peek() |
void |
remove() |
void |
setAllocator(XMLEventAllocator allocator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected XMLStreamReader _streamReader
protected XMLEventAllocator _eventAllocator
public StAXEventReader(XMLStreamReader reader) throws XMLStreamException
XMLStreamException
public boolean hasNext()
hasNext
in interface Iterator
hasNext
in interface XMLEventReader
public XMLEvent nextEvent() throws XMLStreamException
nextEvent
in interface XMLEventReader
XMLStreamException
public void close() throws XMLStreamException
close
in interface XMLEventReader
XMLStreamException
public String getElementText() throws XMLStreamException
getElementText
in interface XMLEventReader
XMLStreamException
- if the current event is not a START_ELEMENT
or if a non text element is encounteredpublic Object getProperty(String name) throws IllegalArgumentException
getProperty
in interface XMLEventReader
name
- The name of the propertyIllegalArgumentException
- if the property is not supportedpublic XMLEvent nextTag() throws XMLStreamException
nextTag
in interface XMLEventReader
XMLStreamException
- if anything other than space characters are encounteredpublic XMLEvent peek() throws XMLStreamException
peek
in interface XMLEventReader
XMLStreamException
public void setAllocator(XMLEventAllocator allocator)
Copyright © 2020 Oracle Corpration. All rights reserved.