Class TiXmlText

Inheritance Relationships

Base Type

Class Documentation

class TiXmlText : public TiXmlNode

XML text. A text node can have 2 ways to output the next. “normal” output and CDATA. It will default to the mode it was parsed from the XML file and you generally want to leave it alone, but you can change the output mode with SetCDATA() and query it with CDATA().

Public Functions

inline TiXmlText(const char *initValue)

Constructor for text element. By default, it is treated as normal, encoded text. If you want it be output as a CDATA text element, set the parameter _cdata to ‘true’

inline virtual ~TiXmlText()
inline TiXmlText(const TiXmlText &copy)
inline TiXmlText &operator=(const TiXmlText &base)
virtual void Print(FILE *cfile, int depth) const

All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.) Either or both cfile and str can be null.

This is a formatted print, and will insert tabs and newlines.

(For an unformatted stream, use the << operator.)

inline bool CDATA() const

Queries whether this represents text using a CDATA section.

inline void SetCDATA(bool _cdata)

Turns on or off a CDATA representation of text.

virtual const char *Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
inline virtual const TiXmlText *ToText() const

Cast to a more defined type. Will return null not of the requested type.

inline virtual TiXmlText *ToText()

Cast to a more defined type. Will return null not of the requested type.

virtual bool Accept(TiXmlVisitor *content) const

Walk the XML tree visiting this node and all of its children.

Protected Functions

virtual TiXmlNode *Clone() const

[internal use] Creates a new Element and returns it.

void CopyTo(TiXmlText *target) const
bool Blank() const