public interface XMLEventReader extends Iterator
Modifier and Type | Method and Description |
---|---|
void |
close()
Free any resources associated with this parser.
|
String |
getElementText()
Reads the text context of an element.
|
Object |
getProperty(String name)
Returns the implementation-specific feature or property of the given
name.
|
boolean |
hasNext()
Indicates whether there are more XML events to be read.
|
XMLEvent |
nextEvent()
Returns the next XML event.
|
XMLEvent |
nextTag()
Returns the next element event.
|
XMLEvent |
peek()
Looks at the next XML event without advancing the cursor in the stream.
|
XMLEvent nextEvent() throws XMLStreamException
XMLStreamException
boolean hasNext()
XMLEvent peek() throws XMLStreamException
null
if there are no more events to read.XMLStreamException
String getElementText() throws XMLStreamException
XMLStreamException
XMLEvent nextTag() throws XMLStreamException
XMLStreamException
- if an event that was not an insignificant
space event was encounteredObject getProperty(String name) throws IllegalArgumentException
IllegalArgumentException
- if the property is not supportedvoid close() throws XMLStreamException
XMLStreamException