javax.xml.stream.events
Interface XMLEvent

All Superinterfaces:
XMLStreamConstants
All Known Subinterfaces:
Attribute, Characters, Comment, DTD, EndDocument, EndElement, EntityDeclaration, EntityReference, Namespace, NotationDeclaration, ProcessingInstruction, StartDocument, StartElement

public interface XMLEvent
extends XMLStreamConstants

An XML stream event.


Field Summary
 
Fields inherited from interface 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 asCharacters()
          Returns this event as a text event.
 EndElement asEndElement()
          Returns this event as an end-element event.
 StartElement asStartElement()
          Returns this event as a start-element event.
 int getEventType()
          Returns the type of this event.
 Location getLocation()
          Returns the location of this event.
 QName getSchemaType()
          Returns schema-related type information about this event, or null if not available.
 boolean isAttribute()
          Indicates whether this event is an attribute event.
 boolean isCharacters()
          Indicates whether this event is a text event.
 boolean isEndDocument()
          Indicates whether this event is an end-document event.
 boolean isEndElement()
          Indicates whether this event is an end-element event.
 boolean isEntityReference()
          Indicates whether this event is an entity reference event.
 boolean isNamespace()
          Indicates whether this event is a namespace declaration event.
 boolean isProcessingInstruction()
          Indicates whether this event is a processing instruction event.
 boolean isStartDocument()
          Indicates whether this event is a start-document event.
 boolean isStartElement()
          Indicates whether this event is a start-element event.
 void writeAsEncodedUnicode(Writer writer)
          Writes this event to the specified writer.
 

Method Detail

getEventType

int getEventType()
Returns the type of this event.


getLocation

Location getLocation()
Returns the location of this event.


isStartElement

boolean isStartElement()
Indicates whether this event is a start-element event.


isAttribute

boolean isAttribute()
Indicates whether this event is an attribute event.


isNamespace

boolean isNamespace()
Indicates whether this event is a namespace declaration event.


isEndElement

boolean isEndElement()
Indicates whether this event is an end-element event.


isEntityReference

boolean isEntityReference()
Indicates whether this event is an entity reference event.


isProcessingInstruction

boolean isProcessingInstruction()
Indicates whether this event is a processing instruction event.


isCharacters

boolean isCharacters()
Indicates whether this event is a text event.


isStartDocument

boolean isStartDocument()
Indicates whether this event is a start-document event.


isEndDocument

boolean isEndDocument()
Indicates whether this event is an end-document event.


asStartElement

StartElement asStartElement()
Returns this event as a start-element event.


asEndElement

EndElement asEndElement()
Returns this event as an end-element event.


asCharacters

Characters asCharacters()
Returns this event as a text event.


getSchemaType

QName getSchemaType()
Returns schema-related type information about this event, or null if not available.


writeAsEncodedUnicode

void writeAsEncodedUnicode(Writer writer)
                           throws XMLStreamException
Writes this event to the specified writer.

Throws:
XMLStreamException