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: */
14: public interface Characters extends XMLEvent {
15: /**
16: * Get the character data of this event
17: */
18: public String getData();
19:
20: /**
21: * Returns true if this set of Characters
22: * is all whitespace. Whitespace inside a document
23: * is reported as CHARACTERS. This method allows
24: * checking of CHARACTERS events to see if they
25: * are composed of only whitespace characters
26: */
27: public boolean isWhiteSpace();
28:
29: /**
30: * Returns true if this is a CData section. If this
31: * event is CData its event type will be CDATA
32: *
33: * If javax.xml.stream.isCoalescing is set to true CDATA Sections
34: * that are surrounded by non CDATA characters will be reported
35: * as a single Characters event. This method will return false
36: * in this case.
37: */
38: public boolean isCData();
39:
40: /**
41: * Return true if this is ignorableWhiteSpace. If
42: * this event is ignorableWhiteSpace its event type will
43: * be SPACE.
44: */
45: public boolean isIgnorableWhiteSpace();
46:
47: }
|