Characters Class Reference

#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 Stringcontent () const
 Returns the text.
 
Stringcontent ()
 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

CharacterstoCharacters (Node *node)
 Casts a generic node to a Characters node.
 
const CharacterstoCharacters (const Node *node)
 Casts a generic node to a Characters node.
 
CharacterstoCharacters (Node &node)
 Casts a generic node to a Characters node.
 
const CharacterstoCharacters (const Node &node)
 Casts a generic node to a Characters node.
 

Detailed Description

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.