APIdia Launch Partner
Top Description Methods
javax.xml.stream.events

public Interface Characters

extends XMLEvent
Known Direct Implementers
com.sun.xml.internal.stream.events.CharacterEvent

This describes the interface to Characters events. All text events get reported as Characters events. Content, CData and whitespace are all reported as Characters events. IgnorableWhitespace, in most cases, will be set to false unless an element declaration of element content is present for the current element.
Author
Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
Since
1.6
Version
1.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the character data
getData
()

Get the character data of this event

public boolean

Returns:

true if it is CDATA, false otherwise
isCData
()

Returns true if this is a CData section.

public boolean

Returns:

true if it is ignorable whitespace, false otherwise
isIgnorableWhiteSpace
()

Return true if this is ignorableWhiteSpace.

public boolean

Returns:

true if the Characters are all whitespace, false otherwise
isWhiteSpace
()

Returns true if this set of Characters is all whitespace.

Inherited from javax.xml.stream.events.XMLEvent:
asCharactersasEndElementasStartElementgetEventTypegetLocationgetSchemaTypeisAttributeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementwriteAsEncodedUnicode

Method Detail

getDataback to summary
public String getData()

Get the character data of this event

Returns:String

the character data

isCDataback to summary
public boolean isCData()

Returns true if this is a CData section. If this event is CData its event type will be CDATA If javax.xml.stream.isCoalescing is set to true CDATA Sections that are surrounded by non CDATA characters will be reported as a single Characters event. This method will return false in this case.

Returns:boolean

true if it is CDATA, false otherwise

isIgnorableWhiteSpaceback to summary
public boolean isIgnorableWhiteSpace()

Return true if this is ignorableWhiteSpace. If this event is ignorableWhiteSpace its event type will be SPACE.

Returns:boolean

true if it is ignorable whitespace, false otherwise

isWhiteSpaceback to summary
public boolean isWhiteSpace()

Returns true if this set of Characters is all whitespace. Whitespace inside a document is reported as CHARACTERS. This method allows checking of CHARACTERS events to see if they are composed of only whitespace characters

Returns:boolean

true if the Characters are all whitespace, false otherwise