29 #ifndef Pt_Xml_Characters_h
30 #define Pt_Xml_Characters_h
32 #include <Pt/Xml/Api.h>
33 #include <Pt/Xml/Node.h>
34 #include <Pt/String.h>
73 {
return _content.
empty(); }
104 if(_isSpace && ch !=
' ' && ch !=
'\t' && ch !=
'\n' && ch !=
'\r')
126 inline static const Node::Type nodeId()
127 {
return Node::Characters; }
142 return nodeCast<Characters>(node);
151 return nodeCast<Characters>(node);
160 return nodeCast<Characters>(node);
169 return nodeCast<Characters>(node);
176 #endif // Pt_Xml_Characters_h
Core module.
Definition: Allocator.h:33
bool isCData() const
Indicates that text was in a CDATA section.
Definition: Characters.h:82
void append(Char ch)
Appends a character to the text.
Definition: Characters.h:102
void clear()
Clears the string.
Definition: Api-String.h:368
String & content()
Returns the text.
Definition: Characters.h:117
void setCData(bool cdata)
Indicates that text was in a CDATA section.
Definition: Characters.h:77
Characters & toCharacters(Node &node)
Casts a generic node to a Characters node.
Definition: Characters.h:158
bool isSpace() const
Returns true if the text consists only of whitespace.
Definition: Characters.h:97
const String & content() const
Returns the text.
Definition: Characters.h:112
bool isChunk() const
Indicates that text might be split up.
Definition: Characters.h:92
bool empty() const
Returns true if empty.
Definition: Api-String.h:245
Unicode character type.
Definition: String.h:67
void setChunk(bool val)
Indicates that text might be split up.
Definition: Characters.h:87
void setContent(const String &content)
Sets the content.
Definition: Characters.h:122
void clear()
Clears all content.
Definition: Characters.h:62
Characters()
Constructs an empty node.
Definition: Characters.h:52
XML document node.
Definition: Node.h:51
A Character node represents text in an XML document.
Definition: Characters.h:48
bool empty() const
Returns true if empty.
Definition: Characters.h:72
Characters * toCharacters(Node *node)
Casts a generic node to a Characters node.
Definition: Characters.h:140
const Characters * toCharacters(const Node *node)
Casts a generic node to a Characters node.
Definition: Characters.h:149
Unicode capable basic_string.
Definition: Api-String.h:44
const Characters & toCharacters(const Node &node)
Casts a generic node to a Characters node.
Definition: Characters.h:167