public interface XMLEventReader extends Iterator
XMLInputFactory,
XMLEventWriter
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Frees any resources associated with this Reader.
|
String |
getElementText()
Reads the content of a text-only element.
|
Object |
getProperty(String
Get the value of a feature/property from the underlying implementation
|
boolean |
hasNext()
Check if there are more events.
|
XMLEvent |
nextEvent()
Get the next XMLEvent
|
XMLEvent |
nextTag()
Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.
|
XMLEvent |
peek()
Check the next XMLEvent without reading it from the stream.
|
forEachRemaining, next, removeXMLEventnextEvent() throws XMLStreamException
XMLStreamException - if there is an error with the underlying XML.
NoSuchElementException - iteration has no more elements.
XMLEvent
boolean hasNext()
XMLEventpeek() throws XMLStreamException
XMLStreamException -
XMLEvent
StringgetElementText() throws XMLStreamException
XMLStreamException - if the current event is not a START_ELEMENT or if a non text element is encountered
XMLEventnextTag() throws XMLStreamException
XMLStreamException - if anything other than space characters are encountered
ObjectgetProperty(String name) throws IllegalArgumentException
name - The name of the property
IllegalArgumentException - if the property is not supported
void close()
throws XMLStreamException
XMLStreamException - if there are errors freeing associated resources