25#ifndef TINYXML_INCLUDED
26#define TINYXML_INCLUDED
30#pragma warning(disable : 4530)
31#pragma warning(disable : 4786)
34#include "common/file.h"
35#include "common/str.h"
36#include "common/util.h"
39#if defined(_DEBUG) && !defined(DEBUG)
43#define TIXML_STRING Common::String
52class TiXmlParsingData;
54const int TIXML_MAJOR_VERSION = 2;
55const int TIXML_MINOR_VERSION = 5;
56const int TIXML_PATCH_VERSION = 2;
63 void Clear() { row = col = -1; }
120 TIXML_ENCODING_UNKNOWN,
122 TIXML_ENCODING_LEGACY
125const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
198 int Row()
const {
return location.row + 1; }
199 int Column()
const {
return location.col + 1; }
207 static const int utf8ByteTable[256];
209 virtual const char *
Parse(
const char *p,
210 TiXmlParsingData *data,
211 TiXmlEncoding encoding ) = 0;
216 TIXML_ERROR_OPENING_FILE,
217 TIXML_ERROR_OUT_OF_MEMORY,
218 TIXML_ERROR_PARSING_ELEMENT,
219 TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
220 TIXML_ERROR_READING_ELEMENT_VALUE,
221 TIXML_ERROR_READING_ATTRIBUTES,
222 TIXML_ERROR_PARSING_EMPTY,
223 TIXML_ERROR_READING_END_TAG,
224 TIXML_ERROR_PARSING_UNKNOWN,
225 TIXML_ERROR_PARSING_COMMENT,
226 TIXML_ERROR_PARSING_DECLARATION,
227 TIXML_ERROR_DOCUMENT_EMPTY,
228 TIXML_ERROR_EMBEDDED_NULL,
229 TIXML_ERROR_PARSING_CDATA,
230 TIXML_ERROR_DOCUMENT_TOP_ONLY,
232 TIXML_ERROR_STRING_COUNT
236 static const char *SkipWhiteSpace(
const char *, TiXmlEncoding encoding);
237 inline static bool IsWhiteSpace(
char c) {
240 inline static bool IsWhiteSpace(
int c) {
242 return IsWhiteSpace((
char)c);
247 static bool StreamWhiteSpace(std::istream *in, TIXML_STRING *tag);
248 static bool StreamTo(std::istream *in,
int character, TIXML_STRING *tag);
255 static const char *ReadName(
const char *p, TIXML_STRING *name, TiXmlEncoding encoding);
260 static const char *ReadText(
const char *in,
262 bool ignoreWhiteSpace,
265 TiXmlEncoding encoding);
268 static const char *GetEntity(
const char *in,
char *value,
int *length, TiXmlEncoding encoding);
272 inline static const char *GetChar(
const char *p,
char *_value,
int *length, TiXmlEncoding encoding) {
274 if (encoding == TIXML_ENCODING_UTF8) {
275 *length = utf8ByteTable[*((
const unsigned char *)p)];
276 assert(*length >= 0 && *length < 5);
283 return GetEntity(p, _value, length, encoding);
286 }
else if (*length) {
289 for (
int i = 0; p[i] && i < *length; ++i) {
292 return p + (*length);
301 static void PutString(
const TIXML_STRING &str, TIXML_STRING *out);
306 static bool StringEqual(
const char *p,
309 TiXmlEncoding encoding);
311 static const char *errorString[TIXML_ERROR_STRING_COUNT];
320 static int IsAlpha(
unsigned char anyByte, TiXmlEncoding encoding);
321 static int IsAlphaNum(
unsigned char anyByte, TiXmlEncoding encoding);
322 inline static int ToLower(
int v, TiXmlEncoding encoding) {
323 if (encoding == TIXML_ENCODING_UTF8) {
331 static void ConvertUTF32ToUTF8(
unsigned long input,
char *output,
int *length);
339 unsigned int strLength;
344 MAX_ENTITY_LENGTH = 6
347 static Entity entity[NUM_ENTITY];
348 static bool condenseWhiteSpace;
367 friend std::istream &operator>>(std::istream &in,
TiXmlNode &base);
385 friend std::ostream &operator<<(std::ostream &out,
const TiXmlNode &base);
388 friend std::string &operator<<(std::string &out,
const TiXmlNode &base);
419 const char *
Value()
const {
return value.c_str(); }
426 const std::string &ValueStr()
const {
return value; }
438 void SetValue(
const char *_value) { value = _value; }
442 void SetValue(
const std::string &_value) { value = _value; }
459 return const_cast<TiXmlNode *
>((
const_cast<const TiXmlNode *
>(
this))->FirstChild(_value));
461 const TiXmlNode *LastChild()
const {
return lastChild; }
464 const TiXmlNode *LastChild(
const char *value)
const;
466 return const_cast<TiXmlNode *
>((
const_cast<const TiXmlNode *
>(
this))->LastChild(_value));
472 const TiXmlNode *LastChild(
const std::string &_value)
const {
return LastChild(_value.c_str()); }
473 TiXmlNode *LastChild(
const std::string &_value) {
return LastChild(_value.c_str()); }
494 return const_cast<TiXmlNode *
>((
const_cast<const TiXmlNode *
>(
this))->IterateChildren(previous));
500 return const_cast<TiXmlNode *
>((
const_cast<const TiXmlNode *
>(
this))->IterateChildren(_value, previous));
549 return const_cast<TiXmlNode *
>((
const_cast<const TiXmlNode *
>(
this))->PreviousSibling(_prev));
566 return const_cast<TiXmlNode *
>((
const_cast<const TiXmlNode *
>(
this))->NextSibling(_next));
613 int Type()
const {
return type; }
678 virtual void StreamIn(std::istream *in, TIXML_STRING *tag) = 0;
682 TiXmlNode *Identify(
const char *start, TiXmlEncoding encoding);
719 TiXmlAttribute(
const std::string &_name,
const std::string &_value) {
735 const char *
Name()
const {
return name.c_str(); }
736 const char *
Value()
const {
return value.c_str(); }
738 const std::string &ValueStr()
const {
return value; }
744 const TIXML_STRING &NameTStr()
const {
return name; }
759 void SetName(
const char *_name) { name = _name; }
760 void SetValue(
const char *_value) { value = _value; }
767 void SetName(
const std::string &_name) { name = _name; }
769 void SetValue(
const std::string &_value) { value = _value; }
784 bool operator==(
const TiXmlAttribute &rhs)
const {
return rhs.name == name; }
785 bool operator<(
const TiXmlAttribute &rhs)
const {
return name < rhs.name; }
786 bool operator>(
const TiXmlAttribute &rhs)
const {
return name > rhs.name; }
791 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
795 Print(&file, depth, 0);
834 const TiXmlAttribute *First()
const {
return (sentinel.next == &sentinel) ? 0 : sentinel.next; }
835 TiXmlAttribute *First() {
return (sentinel.next == &sentinel) ? 0 : sentinel.next; }
836 const TiXmlAttribute *Last()
const {
return (sentinel.prev == &sentinel) ? 0 : sentinel.prev; }
837 TiXmlAttribute *Last() {
return (sentinel.prev == &sentinel) ? 0 : sentinel.prev; }
899 const char *
Attribute(
const char *name,
double *d)
const;
915 if (result == TIXML_SUCCESS) {
928 int QueryValueAttribute(
const std::string &name, T *outValue)
const {
931 return TIXML_NO_ATTRIBUTE;
933 std::stringstream sstream(node->ValueStr());
934 sstream >> *outValue;
936 return TIXML_SUCCESS;
937 return TIXML_WRONG_TYPE;
947 const std::string *
Attribute(
const std::string &name)
const;
948 const std::string *
Attribute(
const std::string &name,
int *i)
const;
949 const std::string *
Attribute(
const std::string &name,
double *d)
const;
954 void SetAttribute(
const std::string &name,
const std::string &_value);
1023 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
1038 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1044 const char *ReadValue(
const char *in, TiXmlParsingData *prevData, TiXmlEncoding encoding);
1073 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
1087 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1122 void operator=(
const TiXmlText &base) { base.CopyTo(
this); }
1132 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
1149 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1177 const std::string &_encoding,
1178 const std::string &_standalone);
1183 const char *_encoding,
1184 const char *_standalone);
1192 const char *
Version()
const {
return version.c_str(); }
1194 const char *
Encoding()
const {
return encoding.c_str(); }
1203 Print(&cfile, depth, 0);
1206 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
1219 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1223 TIXML_STRING version;
1224 TIXML_STRING encoding;
1225 TIXML_STRING standalone;
1248 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
1261 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1292 bool LoadFile(TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING);
1296 bool LoadFile(
const char *filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING);
1309 bool LoadFile(
const std::string &filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING)
1313 return LoadFile(filename.c_str(), encoding);
1315 bool SaveFile(
const std::string &filename)
const
1327 virtual const char *
Parse(
const char *p, TiXmlParsingData *data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING);
1387 int TabSize()
const {
return tabsize; }
1396 errorLocation.row = errorLocation.col = 0;
1412 void SetError(
int err,
const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding);
1425 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1433 TIXML_STRING errorDesc;
1436 bool useMicrosoftBOM;
1526 this->node = ref.node;
1562 TiXmlHandle Child(
const std::string &_value,
int index)
const {
return Child(_value.c_str(), index); }
1622 buffer(), indent(
" "), lineBreak(
"\n") {}
1638 void SetIndent(
const char *_indent) { indent = _indent ? _indent :
""; }
1640 const char *
Indent() {
return indent.c_str(); }
1645 void SetLineBreak(
const char *_lineBreak) { lineBreak = _lineBreak ? _lineBreak :
""; }
1657 const char *
CStr() {
return buffer.c_str(); }
1659 size_t Size() {
return buffer.size(); }
1663 const std::string &Str() {
return buffer; }
1668 for (
int i = 0; i < depth; ++i)
1671 void DoLineBreak() {
1672 buffer += lineBreak;
1676 bool simpleTextPrint;
1677 TIXML_STRING buffer;
1678 TIXML_STRING indent;
1679 TIXML_STRING lineBreak;
Definition: tinyxml.h:707
void SetDoubleValue(double _value)
Set the value from a double.
const char * Value() const
Return the value of this attribute.
Definition: tinyxml.h:736
void SetValue(const char *_value)
Set the value.
Definition: tinyxml.h:760
int QueryIntValue(int *_value) const
int QueryDoubleValue(double *_value) const
QueryDoubleValue examines the value string. See QueryIntValue().
TiXmlAttribute(const char *_name, const char *_value)
Construct an attribute with a name and value.
Definition: tinyxml.h:728
void SetIntValue(int _value)
Set the value from an integer.
const char * Name() const
Return the name of this attribute.
Definition: tinyxml.h:735
double DoubleValue() const
Return the value of this attribute, converted to a double.
virtual void Print(Common::WriteStream &file, int depth) const
Definition: tinyxml.h:794
TiXmlAttribute()
Construct an empty attribute.
Definition: tinyxml.h:712
void SetName(const char *_name)
Set the name of this attribute.
Definition: tinyxml.h:759
int IntValue() const
Return the value of this attribute, converted to an integer.
const TiXmlAttribute * Next() const
Get the next sibling attribute in the DOM. Returns null at end.
const TiXmlAttribute * Previous() const
Get the previous sibling attribute in the DOM. Returns null at beginning.
Definition: tinyxml.h:826
Definition: tinyxml.h:149
static void SetCondenseWhiteSpace(bool condense)
Definition: tinyxml.h:175
virtual void Print(Common::WriteStream &file, int depth) const =0
void * GetUserData()
Get a pointer to arbitrary user data.
Definition: tinyxml.h:202
const void * GetUserData() const
Get a pointer to arbitrary user data.
Definition: tinyxml.h:203
void * userData
Field containing a generic user pointer.
Definition: tinyxml.h:316
void SetUserData(void *user)
Set a pointer to arbitrary user data.
Definition: tinyxml.h:201
int Row() const
Definition: tinyxml.h:198
int Column() const
See Row()
Definition: tinyxml.h:199
static bool IsWhiteSpaceCondensed()
Return the current white space setting.
Definition: tinyxml.h:178
Definition: tinyxml.h:1169
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1209
const char * Standalone() const
Is this a standalone document?
Definition: tinyxml.h:1196
TiXmlDeclaration(const char *_version, const char *_encoding, const char *_standalone)
Construct.
virtual bool Accept(TiXmlVisitor *visitor) const
const char * Encoding() const
Encoding. Will return an empty string if none was found.
Definition: tinyxml.h:1194
TiXmlDeclaration()
Construct an empty declaration.
Definition: tinyxml.h:1172
const char * Version() const
Version. Will return an empty string if none was found.
Definition: tinyxml.h:1192
virtual TiXmlNode * Clone() const
Creates a copy of this Declaration and returns it.
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1208
virtual void Print(Common::WriteStream &cfile, int depth) const
Definition: tinyxml.h:1202
Definition: tinyxml.h:1271
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
Definition: tinyxml.h:1344
int ErrorRow() const
Definition: tinyxml.h:1358
virtual TiXmlNode * Clone() const
bool Error() const
Definition: tinyxml.h:1341
bool LoadFile(Common::SeekableReadStream &file, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
bool LoadFile(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
void SetTabSize(int _tabsize)
Definition: tinyxml.h:1385
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1415
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1414
bool SaveFile(Common::WriteStream &) const
Save a file using the given FILE*. Returns true if successful.
bool LoadFile(const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Load a file using the given filename. Returns true if successful.
virtual void Print(Common::WriteStream &file, int depth=0) const
Print this Document to file.
virtual bool Accept(TiXmlVisitor *content) const
TiXmlDocument()
Create an empty document, that has no name.
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
bool SaveFile() const
Save a file using the current document value. Returns true if successful.
const TiXmlElement * RootElement() const
Definition: tinyxml.h:1333
int ErrorId() const
Definition: tinyxml.h:1349
void ClearError()
Definition: tinyxml.h:1392
int ErrorCol() const
The column where the error occured. See ErrorRow()
Definition: tinyxml.h:1359
TiXmlDocument(const char *documentName)
Create a document with a name. The name of the document is also the filename of the xml.
bool SaveFile(const char *filename) const
Save a file using the given filename. Returns true if successful.
Definition: tinyxml.h:864
TiXmlElement(const char *in_value)
Construct an element.
const char * Attribute(const char *name, double *d) const
void SetDoubleAttribute(const char *name, double value)
virtual TiXmlNode * Clone() const
Creates a new Element and returns it - the returned element is a copy.
int QueryFloatAttribute(const char *name, float *_value) const
QueryFloatAttribute examines the attribute - see QueryIntAttribute().
Definition: tinyxml.h:912
void RemoveAttribute(const char *name)
int QueryIntAttribute(const char *name, int *_value) const
const char * Attribute(const char *name) const
const char * Attribute(const char *name, int *i) const
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1025
void SetAttribute(const char *name, const char *_value)
virtual bool Accept(TiXmlVisitor *visitor) const
void SetAttribute(const char *name, int value)
virtual void Print(Common::WriteStream &cfile, int depth) const
const TiXmlAttribute * FirstAttribute() const
Access the first attribute in this element.
Definition: tinyxml.h:976
const TiXmlAttribute * LastAttribute() const
Access the last attribute in this element.
Definition: tinyxml.h:978
int QueryDoubleAttribute(const char *name, double *_value) const
QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1026
const char * GetText() const
Definition: tinyxml.h:1519
TiXmlUnknown * ToUnknown() const
Definition: tinyxml.h:1577
TiXmlHandle(const TiXmlHandle &ref)
Copy constructor.
Definition: tinyxml.h:1524
TiXmlNode * ToNode() const
Definition: tinyxml.h:1568
TiXmlHandle Child(int index) const
TiXmlHandle FirstChildElement(const char *value) const
Return a handle to the first child element with the given name.
TiXmlHandle ChildElement(int index) const
TiXmlHandle FirstChild(const char *value) const
Return a handle to the first child node with the given name.
TiXmlText * Text() const
Definition: tinyxml.h:1590
TiXmlText * ToText() const
Definition: tinyxml.h:1574
TiXmlHandle Child(const char *value, int index) const
TiXmlUnknown * Unknown() const
Definition: tinyxml.h:1594
TiXmlElement * ToElement() const
Definition: tinyxml.h:1571
TiXmlHandle(TiXmlNode *_node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
Definition: tinyxml.h:1522
TiXmlElement * Element() const
Definition: tinyxml.h:1586
TiXmlHandle FirstChildElement() const
Return a handle to the first child element.
TiXmlNode * Node() const
Definition: tinyxml.h:1582
TiXmlHandle FirstChild() const
Return a handle to the first child node.
TiXmlHandle ChildElement(const char *value, int index) const
Definition: tinyxml.h:357
const TiXmlNode * NextSibling(const char *) const
Navigate to a sibling node with the given 'value'.
int Type() const
Definition: tinyxml.h:613
virtual const TiXmlComment * ToComment() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:628
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
const TiXmlElement * NextSiblingElement(const char *) const
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:630
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
void SetValue(const char *_value)
Definition: tinyxml.h:438
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:543
const char * Value() const
Definition: tinyxml.h:419
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:560
TiXmlNode * LastChild()
The last child of this node. Will be null if there are no children.
Definition: tinyxml.h:462
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:631
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
virtual TiXmlComment * ToComment()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:635
void Clear()
Delete all the children of this node. Does not affect 'this'.
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
const TiXmlNode * IterateChildren(const char *value, const TiXmlNode *previous) const
This flavor of IterateChildren searches for children with a particular 'value'.
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:633
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:626
NodeType
Definition: tinyxml.h:395
virtual TiXmlNode * Clone() const =0
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:638
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:637
TiXmlNode * Parent()
One step up the DOM.
Definition: tinyxml.h:449
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:629
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:636
const TiXmlElement * FirstChildElement(const char *_value) const
Convenience function to get through elements.
TiXmlNode * FirstChild(const char *_value)
The first child of this node with the matching 'value'. Will be null if none found.
Definition: tinyxml.h:456
bool NoChildren() const
Returns true if this node has no children.
Definition: tinyxml.h:624
const TiXmlElement * NextSiblingElement() const
virtual bool Accept(TiXmlVisitor *visitor) const =0
const TiXmlNode * PreviousSibling(const char *) const
Navigate to a sibling node.
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:634
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:627
const TiXmlDocument * GetDocument() const
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
const TiXmlNode * FirstChild() const
The first child of this node. Will be null if there are no children.
Definition: tinyxml.h:452
const TiXmlNode * FirstChild(const char *value) const
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
TiXmlNode * LastChild(const char *_value)
The last child of this node matching 'value'. Will be null if there are no children.
Definition: tinyxml.h:465
Definition: tinyxml.h:1619
virtual bool VisitEnter(const TiXmlElement &element, const TiXmlAttribute *firstAttribute)
Visit an element.
virtual bool VisitExit(const TiXmlElement &element)
Visit an element.
const char * Indent()
Query the indention string.
Definition: tinyxml.h:1640
void SetIndent(const char *_indent)
Definition: tinyxml.h:1638
void SetLineBreak(const char *_lineBreak)
Definition: tinyxml.h:1645
virtual bool VisitExit(const TiXmlDocument &doc)
Visit a document.
virtual bool Visit(const TiXmlText &text)
Visit a text node.
virtual bool VisitEnter(const TiXmlDocument &doc)
Visit a document.
virtual bool Visit(const TiXmlComment &comment)
Visit a comment node.
const char * LineBreak()
Query the current line breaking string.
Definition: tinyxml.h:1647
void SetStreamPrinting()
Definition: tinyxml.h:1652
virtual bool Visit(const TiXmlDeclaration &declaration)
Visit a declaration.
size_t Size()
Return the length of the result string.
Definition: tinyxml.h:1659
virtual bool Visit(const TiXmlUnknown &unknown)
Visit an unknow node.
const char * CStr()
Return the result.
Definition: tinyxml.h:1657
Definition: tinyxml.h:1099
virtual void Print(Common::WriteStream &cfile, int depth) const
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1135
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1134
virtual bool Accept(TiXmlVisitor *content) const
bool CDATA() const
Queries whether this represents text using a CDATA section.
Definition: tinyxml.h:1128
void SetCDATA(bool _cdata)
Turns on or off a CDATA representation of text.
Definition: tinyxml.h:1130
TiXmlText(const char *initValue)
Definition: tinyxml.h:1107
virtual TiXmlNode * Clone() const
[internal use] Creates a new Element and returns it.
Definition: tinyxml.h:1235
virtual bool Accept(TiXmlVisitor *content) const
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1251
virtual void Print(Common::WriteStream &cfile, int depth) const
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1250
virtual TiXmlNode * Clone() const
Creates a copy of this Unknown and returns it.
virtual bool Visit(const TiXmlText &text)
Visit a text node.
Definition: tinyxml.h:104
virtual bool VisitEnter(const TiXmlDocument &doc)
Visit a document.
Definition: tinyxml.h:92
virtual bool VisitEnter(const TiXmlElement &element, const TiXmlAttribute *firstAttribute)
Visit an element.
Definition: tinyxml.h:97
virtual bool Visit(const TiXmlDeclaration &declaration)
Visit a declaration.
Definition: tinyxml.h:102
virtual bool Visit(const TiXmlComment &comment)
Visit a comment node.
Definition: tinyxml.h:106
virtual bool VisitExit(const TiXmlDocument &doc)
Visit a document.
Definition: tinyxml.h:94
virtual bool Visit(const TiXmlUnknown &unknown)
Visit an unknow node.
Definition: tinyxml.h:108
virtual bool VisitExit(const TiXmlElement &element)
Visit an element.
Definition: tinyxml.h:99
Out copy(In first, In last, Out dst)
Definition: algorithm.h:52