EventReaderDelegate
public interface XMLEventReader extends Iterator<Object>
XMLInputFactory
,
XMLEventWriter
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Frees any resources associated with this Reader.
|
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() |
Check if there are more events.
|
XMLEvent |
nextEvent() |
Gets 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, remove
XMLEvent nextEvent() throws XMLStreamException
StartDocument
.XMLStreamException
- if there is an error with the underlying XML.NoSuchElementException
- iteration has no more elements.XMLEvent
boolean hasNext()
XMLEvent peek() throws XMLStreamException
XMLStreamException
XMLEvent
String getElementText() throws XMLStreamException
XMLStreamException
- if the current event is not a START_ELEMENT
or if a non text element is encounteredXMLEvent nextTag() throws XMLStreamException
XMLStreamException
- if anything other than space characters are encounteredObject getProperty(String name) throws IllegalArgumentException
name
- The name of the propertyIllegalArgumentException
- if the property is not supportedvoid close() throws XMLStreamException
XMLStreamException
- if there are errors freeing associated resources Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps