| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
XMLEventReader r = …;
XMLEvent event = r.nextEvent();
Based on 45 examples
XMLEventReader reader = …;
XMLEvent event = reader.peek();
Based on 34 examples
public interface XMLEvent extends XMLStreamConstants
This is the base event interface for handling markup events. Events are value objects that are used to communicate the XML 1.0 InfoSet to the Application. Events may be cached and referenced after the parse has completed.
Field Summary |
---|
Fields inherited from class javax.xml.stream.XMLStreamConstants |
---|
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Method Summary | |
---|---|
Characters |
Returns this event as Characters, may result in a class cast exception if this event is not Characters. |
EndElement |
Returns this event as an end element event, may result in a class cast exception if this event is not a end element. |
StartElement |
Returns this event as a start element event, may result in a class cast exception if this event is not a start element. |
int |
Returns an integer code for this event. |
Location |
Return the location of this event. |
QName |
This method is provided for implementations to provide optional type information about the associated event. |
boolean |
A utility function to check if this event is an Attribute. |
boolean |
A utility function to check if this event is Characters. |
boolean |
A utility function to check if this event is an EndDocument. |
boolean |
A utility function to check if this event is a EndElement. |
boolean |
A utility function to check if this event is an EntityReference. |
boolean |
A utility function to check if this event is a Namespace. |
boolean |
A utility function to check if this event is a ProcessingInstruction. |
boolean |
A utility function to check if this event is a StartDocument. |
boolean |
A utility function to check if this event is a StartElement. |
void |
writeAsEncodedUnicode(Writer writer) This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. |
Method Detail |
---|
public Characters asCharacters()
public EndElement asEndElement()
public StartElement asStartElement()
public int getEventType()
public Location getLocation()
public QName getSchemaType()
public boolean isAttribute()
public boolean isCharacters()
public boolean isEndDocument()
public boolean isEndElement()
public boolean isEntityReference()
public boolean isNamespace()
public boolean isProcessingInstruction()
public boolean isStartDocument()
public boolean isStartElement()
public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException
writer
- The writer that will output the dataXMLStreamException
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |