javax.xml.stream.events

Interface XMLEvent

public interface XMLEvent extends XMLStreamConstants

An XML stream event.
Method Summary
CharactersasCharacters()
Returns this event as a text event.
EndElementasEndElement()
Returns this event as an end-element event.
StartElementasStartElement()
Returns this event as a start-element event.
intgetEventType()
Returns the type of this event.
LocationgetLocation()
Returns the location of this event.
QNamegetSchemaType()
Returns schema-related type information about this event, or null if not available.
booleanisAttribute()
Indicates whether this event is an attribute event.
booleanisCharacters()
Indicates whether this event is a text event.
booleanisEndDocument()
Indicates whether this event is an end-document event.
booleanisEndElement()
Indicates whether this event is an end-element event.
booleanisEntityReference()
Indicates whether this event is an entity reference event.
booleanisNamespace()
Indicates whether this event is a namespace declaration event.
booleanisProcessingInstruction()
Indicates whether this event is a processing instruction event.
booleanisStartDocument()
Indicates whether this event is a start-document event.
booleanisStartElement()
Indicates whether this event is a start-element event.
voidwriteAsEncodedUnicode(Writer writer)
Writes this event to the specified writer.

Method Detail

asCharacters

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

asEndElement

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

asStartElement

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

getEventType

public int getEventType()
Returns the type of this event.

getLocation

public Location getLocation()
Returns the location of this event.

getSchemaType

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

isAttribute

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

isCharacters

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

isEndDocument

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

isEndElement

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

isEntityReference

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

isNamespace

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

isProcessingInstruction

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

isStartDocument

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

isStartElement

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

writeAsEncodedUnicode

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