#include <Pt/Xml/Characters.h>
A Character node represents text in an XML document. More...
Inherits Node.
Public Member Functions | |
Characters () | |
Constructs an empty node. | |
void | append (Char ch) |
Appends a character to the text. | |
void | clear () |
Clears all content. | |
const String & | content () const |
Returns the text. | |
String & | content () |
Returns the text. | |
bool | empty () const |
Returns true if empty. | |
bool | isCData () const |
Indicates that text was in a CDATA section. | |
bool | isChunk () const |
Indicates that text might be split up. | |
bool | isSpace () const |
Returns true if the text consists only of whitespace. | |
void | setCData (bool cdata) |
Indicates that text was in a CDATA section. | |
void | setChunk (bool val) |
Indicates that text might be split up. | |
void | setContent (const String &content) |
Sets the content. | |
Type | type () const |
Returns the type of the node. | |
Related Functions | |
Characters * | toCharacters (Node *node) |
Casts a generic node to a Characters node. | |
const Characters * | toCharacters (const Node *node) |
Casts a generic node to a Characters node. | |
Characters & | toCharacters (Node &node) |
Casts a generic node to a Characters node. | |
const Characters & | toCharacters (const Node &node) |
Casts a generic node to a Characters node. | |
Character nodes are reported for text between a start element and an end element, between two start elements or between two end elements. Not only normal text, but also CDATA sections are reported as Characters, unless the XmlReader is configured to report CDATA sections separately.