Class StAXEventReader
java.lang.Object
com.sun.xml.fastinfoset.stax.events.StAXEventReader
- All Implemented Interfaces:
Iterator<Object>,XMLEventReader
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Reads the content of a text-only element.getProperty(String name) Get the value of a feature/property from the underlying implementationbooleanhasNext()next()nextTag()Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.peek()voidremove()voidsetAllocator(XMLEventAllocator allocator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
_streamReader
-
_eventAllocator
-
-
Constructor Details
-
StAXEventReader
- Throws:
XMLStreamException
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<Object>- Specified by:
hasNextin interfaceXMLEventReader
-
nextEvent
- Specified by:
nextEventin interfaceXMLEventReader- Throws:
XMLStreamException
-
remove
public void remove() -
close
- Specified by:
closein interfaceXMLEventReader- Throws:
XMLStreamException
-
getElementText
Reads the content of a text-only element. Precondition: the current event is START_ELEMENT. Postcondition: The current event is the corresponding END_ELEMENT.- Specified by:
getElementTextin interfaceXMLEventReader- Throws:
XMLStreamException- if the current event is not a START_ELEMENT or if a non text element is encountered
-
getProperty
Get the value of a feature/property from the underlying implementation- Specified by:
getPropertyin interfaceXMLEventReader- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
IllegalArgumentException- if the property is not supported
-
nextTag
Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached. If anything other than space characters are encountered, an exception is thrown. This method should be used when processing element-only content because the parser is not able to recognize ignorable whitespace if the DTD is missing or not interpreted.- Specified by:
nextTagin interfaceXMLEventReader- Throws:
XMLStreamException- if anything other than space characters are encountered
-
next
-
peek
- Specified by:
peekin interfaceXMLEventReader- Throws:
XMLStreamException
-
setAllocator
-