XMLEventReader (Java SE 15 & JDK 15) (original) (raw)

All Superinterfaces:

[Iterator](../../../../java.base/java/util/Iterator.html "interface in java.util")<[Object](../../../../java.base/java/lang/Object.html "class in java.lang")>

All Known Implementing Classes:

[EventReaderDelegate](util/EventReaderDelegate.html "class in javax.xml.stream.util")


public interface XMLEventReader extends Iterator<Object>

This is the top level interface for parsing XML Events. It provides the ability to peek at the next event and returns configuration information through the property interface.

Since:

1.6

See Also:

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.