#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 | clear () |
| Clears all content. | |
| bool | empty () const |
| Returns true if empty. | |
| void | setCData (bool cdata) |
| Indicates that text was in a CDATA section. | |
| bool | isCData () const |
| Indicates that text was in a CDATA section. | |
| void | setChunk (bool val) |
| Indicates that text might be split up. | |
| bool | isChunk () const |
| Indicates that text might be split up. | |
| bool | isSpace () const |
| Returns true if the text consists only of whitespace. | |
| void | append (Char ch) |
| Appends a character to the text. | |
| const String & | content () const |
| Returns the text. | |
| String & | content () |
| Returns the text. | |
| 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.