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 52 class TiXmlParsingData;
54 const int TIXML_MAJOR_VERSION = 2;
55 const int TIXML_MINOR_VERSION = 5;
56 const int TIXML_PATCH_VERSION = 2;
63 void Clear() { row = col = -1; }
120 TIXML_ENCODING_UNKNOWN,
122 TIXML_ENCODING_LEGACY
125 const 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; }
441 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);
718 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; }
740 int IntValue()
const;
741 double DoubleValue()
const;
744 const TIXML_STRING &NameTStr()
const {
return name; }
755 int QueryIntValue(
int *_value)
const;
757 int QueryDoubleValue(
double *_value)
const;
759 void SetName(
const char *_name) { name = _name; }
760 void SetValue(
const char *_value) { value = _value; }
762 void SetIntValue(
int _value);
763 void SetDoubleValue(
double _value);
766 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; }
883 const char *Attribute(
const char *name)
const;
891 const char *Attribute(
const char *name,
int *i)
const;
899 const char *Attribute(
const char *name,
double *d)
const;
908 int QueryIntAttribute(
const char *name,
int *_value)
const;
910 int QueryDoubleAttribute(
const char *name,
double *_value)
const;
914 int result = QueryDoubleAttribute(name, &d);
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;
944 void SetAttribute(
const char *name,
const char *_value);
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;
950 int QueryIntAttribute(
const std::string &name,
int *_value)
const;
951 int QueryDoubleAttribute(
const std::string &name,
double *_value)
const;
954 void SetAttribute(
const std::string &name,
const std::string &_value);
956 void SetAttribute(
const std::string &name,
int _value);
962 void SetAttribute(
const char *name,
int value);
967 void SetDoubleAttribute(
const char *name,
double value);
971 void RemoveAttribute(
const char *name);
973 void RemoveAttribute(
const std::string &name) { RemoveAttribute(name.c_str()); }
1013 const char *GetText()
const;
1023 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
1037 #ifdef TIXML_USE_STL 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);
1086 #ifdef TIXML_USE_STL 1087 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1113 #ifdef TIXML_USE_STL 1122 void operator=(
const TiXmlText &base) { base.CopyTo(
this); }
1132 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
1148 #ifdef TIXML_USE_STL 1149 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1174 #ifdef TIXML_USE_STL 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);
1218 #ifdef TIXML_USE_STL 1219 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1223 TIXML_STRING version;
1224 TIXML_STRING encoding;
1225 TIXML_STRING standalone;
1241 void operator=(
const TiXmlUnknown ©) { copy.CopyTo(
this); }
1248 virtual const char *Parse(
const char *p, TiXmlParsingData *data, TiXmlEncoding encoding);
1260 #ifdef TIXML_USE_STL 1261 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1278 #ifdef TIXML_USE_STL 1292 bool LoadFile(TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING);
1294 bool SaveFile()
const;
1296 bool LoadFile(
const char *filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING);
1298 bool SaveFile(
const char *filename)
const;
1308 #ifdef TIXML_USE_STL 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 1319 return SaveFile(filename.c_str());
1327 virtual const char *Parse(
const char *p, TiXmlParsingData *data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING);
1334 TiXmlElement *RootElement() {
return FirstChildElement(); }
1387 int TabSize()
const {
return tabsize; }
1396 errorLocation.row = errorLocation.col = 0;
1412 void SetError(
int err,
const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding);
1424 #ifdef TIXML_USE_STL 1425 virtual void StreamIn(std::istream *in, TIXML_STRING *tag);
1433 TIXML_STRING errorDesc;
1436 bool useMicrosoftBOM;
1526 this->node = ref.node;
1537 TiXmlHandle FirstChildElement(
const char *value)
const;
1542 TiXmlHandle Child(
const char *value,
int index)
const;
1551 TiXmlHandle ChildElement(
const char *value,
int index)
const;
1558 #ifdef TIXML_USE_STL 1559 TiXmlHandle FirstChild(
const std::string &_value)
const {
return FirstChild(_value.c_str()); }
1560 TiXmlHandle FirstChildElement(
const std::string &_value)
const {
return FirstChildElement(_value.c_str()); }
1562 TiXmlHandle Child(
const std::string &_value,
int index)
const {
return Child(_value.c_str(), index); }
1563 TiXmlHandle ChildElement(
const std::string &_value,
int index)
const {
return ChildElement(_value.c_str(), index); }
1622 buffer(), indent(
" "), lineBreak(
"\n") {}
1631 virtual bool Visit(
const TiXmlText &text);
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(); }
1661 #ifdef TIXML_USE_STL 1662 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;
1683 #pragma warning(pop) void ClearError()
Definition: tinyxml.h:1392
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1251
int Row() const
Definition: tinyxml.h:198
Definition: tinyxml.h:1271
virtual bool VisitEnter(const TiXmlDocument &doc)
Visit a document.
Definition: tinyxml.h:92
TiXmlNode * Parent()
One step up the DOM.
Definition: tinyxml.h:449
void SetTabSize(int _tabsize)
Definition: tinyxml.h:1385
int ErrorId() const
Definition: tinyxml.h:1349
const void * GetUserData() const
Get a pointer to arbitrary user data.
Definition: tinyxml.h:203
void SetCDATA(bool _cdata)
Turns on or off a CDATA representation of text.
Definition: tinyxml.h:1130
NodeType
Definition: tinyxml.h:395
virtual const TiXmlComment * ToComment() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:628
virtual TiXmlNode * Clone() const
Creates a new Element and returns it - the returned element is a copy.
int ErrorCol() const
The column where the error occured. See ErrorRow()
Definition: tinyxml.h:1359
virtual bool Visit(const TiXmlComment &comment)
Visit a comment node.
Definition: tinyxml.h:106
TiXmlUnknown * ToUnknown() const
Definition: tinyxml.h:1577
Definition: tinyxml.h:1235
static void SetCondenseWhiteSpace(bool condense)
Definition: tinyxml.h:175
Definition: tinyxml.h:1519
size_t Size()
Return the length of the result string.
Definition: tinyxml.h:1659
virtual bool Accept(TiXmlVisitor *visitor) const
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
virtual void Print(Common::WriteStream &cfile, int depth) const
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
virtual void Print(Common::WriteStream &file, int depth=0) const
Print this Document to file.
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
void SetIndent(const char *_indent)
Definition: tinyxml.h:1638
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1135
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:543
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:636
const char * Name() const
Return the name of this attribute.
Definition: tinyxml.h:735
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:633
const TiXmlDocument * GetDocument() const
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
Definition: tinyxml.h:357
virtual bool Visit(const TiXmlUnknown &unknown)
Visit an unknow node.
Definition: tinyxml.h:108
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:630
void SetStreamPrinting()
Definition: tinyxml.h:1652
TiXmlUnknown * Unknown() const
Definition: tinyxml.h:1594
virtual bool Visit(const TiXmlText &text)
Visit a text node.
Definition: tinyxml.h:104
const TiXmlNode * FirstChild() const
The first child of this node. Will be null if there are no children.
Definition: tinyxml.h:452
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:627
TiXmlText(const char *initValue)
Definition: tinyxml.h:1107
Out copy(In first, In last, Out dst)
Definition: algorithm.h:52
void SetName(const char *_name)
Set the name of this attribute.
Definition: tinyxml.h:759
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1250
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1208
TiXmlAttribute()
Construct an empty attribute.
Definition: tinyxml.h:712
const char * Encoding() const
Encoding. Will return an empty string if none was found.
Definition: tinyxml.h:1194
Definition: tinyxml.h:707
const TiXmlElement * RootElement() const
Definition: tinyxml.h:1333
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1209
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:638
int Column() const
See Row()
Definition: tinyxml.h:199
void Clear()
Delete all the children of this node. Does not affect 'this'.
TiXmlText * ToText() const
Definition: tinyxml.h:1574
Definition: tinyxml.h:149
bool NoChildren() const
Returns true if this node has no children.
Definition: tinyxml.h:624
Definition: tinyxml.h:1169
bool CDATA() const
Queries whether this represents text using a CDATA section.
Definition: tinyxml.h:1128
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
TiXmlDeclaration()
Construct an empty declaration.
Definition: tinyxml.h:1172
const TiXmlAttribute * FirstAttribute() const
Access the first attribute in this element.
Definition: tinyxml.h:976
int Type() const
Definition: tinyxml.h:613
const TiXmlElement * NextSiblingElement() const
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
void * userData
Field containing a generic user pointer.
Definition: tinyxml.h:316
int ErrorRow() const
Definition: tinyxml.h:1358
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1025
bool Error() const
Definition: tinyxml.h:1341
void SetValue(const char *_value)
Set the value.
Definition: tinyxml.h:760
TiXmlElement * ToElement() const
Definition: tinyxml.h:1571
TiXmlNode * Node() const
Definition: tinyxml.h:1582
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 char * Value() const
Definition: tinyxml.h:419
void * GetUserData()
Get a pointer to arbitrary user data.
Definition: tinyxml.h:202
const char * Standalone() const
Is this a standalone document?
Definition: tinyxml.h:1196
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1415
const char * CStr()
Return the result.
Definition: tinyxml.h:1657
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
TiXmlText * Text() const
Definition: tinyxml.h:1590
const char * Indent()
Query the indention string.
Definition: tinyxml.h:1640
void SetValue(const char *_value)
Definition: tinyxml.h:438
Definition: tinyxml.h:1099
TiXmlNode * ToNode() const
Definition: tinyxml.h:1568
static bool IsWhiteSpaceCondensed()
Return the current white space setting.
Definition: tinyxml.h:178
virtual void Print(Common::WriteStream &file, int depth) const
Definition: tinyxml.h:794
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
TiXmlElement * Element() const
Definition: tinyxml.h:1586
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1134
virtual TiXmlComment * ToComment()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:635
Definition: tinyxml.h:826
virtual bool VisitExit(const TiXmlDocument &doc)
Visit a document.
Definition: tinyxml.h:94
Definition: tinyxml.h:864
const TiXmlAttribute * LastAttribute() const
Access the last attribute in this element.
Definition: tinyxml.h:978
const char * Version() const
Version. Will return an empty string if none was found.
Definition: tinyxml.h:1192
void SetLineBreak(const char *_lineBreak)
Definition: tinyxml.h:1645
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
virtual bool VisitExit(const TiXmlElement &element)
Visit an element.
Definition: tinyxml.h:99
int QueryFloatAttribute(const char *name, float *_value) const
QueryFloatAttribute examines the attribute - see QueryIntAttribute().
Definition: tinyxml.h:912
virtual void Print(Common::WriteStream &cfile, int depth) const
Definition: tinyxml.h:1202
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:637
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 const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1414
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
const char * LineBreak()
Query the current line breaking string.
Definition: tinyxml.h:1647
TiXmlNode * LastChild()
The last child of this node. Will be null if there are no children.
Definition: tinyxml.h:462
Definition: tinyxml.h:1619
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:626
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:560
virtual bool VisitEnter(const TiXmlElement &element, const TiXmlAttribute *firstAttribute)
Visit an element.
Definition: tinyxml.h:97
void SetUserData(void *user)
Set a pointer to arbitrary user data.
Definition: tinyxml.h:201
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:634
TiXmlHandle(const TiXmlHandle &ref)
Copy constructor.
Definition: tinyxml.h:1524
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
const char * Value() const
Return the value of this attribute.
Definition: tinyxml.h:736
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
Definition: tinyxml.h:1344
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1026
virtual bool Visit(const TiXmlDeclaration &declaration)
Visit a declaration.
Definition: tinyxml.h:102
TiXmlAttribute(const char *_name, const char *_value)
Construct an attribute with a name and value.
Definition: tinyxml.h:728