01 package javax.xml.stream.events;
02
03 /**
04 * This describes the interface to Characters events.
05 * All text events get reported as Characters events.
06 * Content, CData and whitespace are all reported as
07 * Characters events. IgnorableWhitespace, in most cases,
08 * will be set to false unless an element declaration of element
09 * content is present for the current element.
10 *
11 * @version 1.0
12 * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
13 * @since 1.6
14 */
15 public interface Characters extends XMLEvent {
16 /**
17 * Get the character data of this event
18 */
19 public String getData();
20
21 /**
22 * Returns true if this set of Characters
23 * is all whitespace. Whitespace inside a document
24 * is reported as CHARACTERS. This method allows
25 * checking of CHARACTERS events to see if they
26 * are composed of only whitespace characters
27 */
28 public boolean isWhiteSpace();
29
30 /**
31 * Returns true if this is a CData section. If this
32 * event is CData its event type will be CDATA
33 *
34 * If javax.xml.stream.isCoalescing is set to true CDATA Sections
35 * that are surrounded by non CDATA characters will be reported
36 * as a single Characters event. This method will return false
37 * in this case.
38 */
39 public boolean isCData();
40
41 /**
42 * Return true if this is ignorableWhiteSpace. If
43 * this event is ignorableWhiteSpace its event type will
44 * be SPACE.
45 */
46 public boolean isIgnorableWhiteSpace();
47
48 }
|