26 #ifndef TINYXML_INCLUDED
27 #define TINYXML_INCLUDED
30 #pragma warning( push )
31 #pragma warning( disable : 4530 )
32 #pragma warning( disable : 4786 )
42 #if defined( _DEBUG ) && !defined( DEBUG )
50 #define TIXML_STRING std::string
53 #define TIXML_STRING TiXmlString
63 #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
65 #define TIXML_SNPRINTF _snprintf_s
66 #define TIXML_SNSCANF _snscanf_s
67 #define TIXML_SSCANF sscanf_s
68 #elif defined(_MSC_VER) && (_MSC_VER >= 1200 )
71 #define TIXML_SNPRINTF _snprintf
72 #define TIXML_SNSCANF _snscanf
73 #define TIXML_SSCANF sscanf
74 #elif defined(__GNUC__) && (__GNUC__ >= 3 )
77 #define TIXML_SNPRINTF snprintf
78 #define TIXML_SNSCANF snscanf
79 #define TIXML_SSCANF sscanf
81 #define TIXML_SSCANF sscanf
92 class TiXmlParsingData;
94 const int TIXML_MAJOR_VERSION = 2;
95 const int TIXML_MINOR_VERSION = 5;
96 const int TIXML_PATCH_VERSION = 3;
103 TiXmlCursor() { Clear(); }
104 void Clear() { row = col = -1; }
166 TIXML_ENCODING_UNKNOWN,
168 TIXML_ENCODING_LEGACY
171 const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
214 virtual void Print( FILE* cfile,
int depth )
const = 0;
245 int Row()
const {
return location.row + 1; }
246 int Column()
const {
return location.col + 1; }
254 static const int utf8ByteTable[256];
256 virtual const char*
Parse(
const char* p,
257 TiXmlParsingData* data,
258 TiXmlEncoding encoding ) = 0;
263 static void EncodeString(
const TIXML_STRING& str, TIXML_STRING* out );
269 TIXML_ERROR_OPENING_FILE,
270 TIXML_ERROR_OUT_OF_MEMORY,
271 TIXML_ERROR_PARSING_ELEMENT,
272 TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
273 TIXML_ERROR_READING_ELEMENT_VALUE,
274 TIXML_ERROR_READING_ATTRIBUTES,
275 TIXML_ERROR_PARSING_EMPTY,
276 TIXML_ERROR_READING_END_TAG,
277 TIXML_ERROR_PARSING_UNKNOWN,
278 TIXML_ERROR_PARSING_COMMENT,
279 TIXML_ERROR_PARSING_DECLARATION,
280 TIXML_ERROR_DOCUMENT_EMPTY,
281 TIXML_ERROR_EMBEDDED_NULL,
282 TIXML_ERROR_PARSING_CDATA,
283 TIXML_ERROR_DOCUMENT_TOP_ONLY,
285 TIXML_ERROR_STRING_COUNT
290 static const char* SkipWhiteSpace(
const char*, TiXmlEncoding encoding );
291 inline static bool IsWhiteSpace(
char c )
293 return ( isspace( (
unsigned char) c ) || c ==
'\n' || c ==
'\r' );
295 inline static bool IsWhiteSpace(
int c )
298 return IsWhiteSpace( (
char) c );
303 static bool StreamWhiteSpace( std::istream * in, TIXML_STRING * tag );
304 static bool StreamTo( std::istream * in,
int character, TIXML_STRING * tag );
311 static const char* ReadName(
const char* p, TIXML_STRING* name, TiXmlEncoding encoding );
316 static const char* ReadText(
const char* in,
318 bool ignoreWhiteSpace,
321 TiXmlEncoding encoding );
324 static const char* GetEntity(
const char* in,
char* value,
int* length, TiXmlEncoding encoding );
328 inline static const char* GetChar(
const char* p,
char* _value,
int* length, TiXmlEncoding encoding )
331 if ( encoding == TIXML_ENCODING_UTF8 )
333 *length = utf8ByteTable[ *((
const unsigned char*)p) ];
334 assert( *length >= 0 && *length < 5 );
344 return GetEntity( p, _value, length, encoding );
352 for(
int i=0; p[i] && i<*length; ++i ) {
355 return p + (*length);
367 static bool StringEqual(
const char* p,
370 TiXmlEncoding encoding );
372 static const char* errorString[ TIXML_ERROR_STRING_COUNT ];
374 TiXmlCursor location;
381 static int IsAlpha(
unsigned char anyByte, TiXmlEncoding encoding );
382 static int IsAlphaNum(
unsigned char anyByte, TiXmlEncoding encoding );
383 inline static int ToLower(
int v, TiXmlEncoding encoding )
385 if ( encoding == TIXML_ENCODING_UTF8 )
387 if ( v < 128 )
return tolower( v );
395 static void ConvertUTF32ToUTF8(
unsigned long input,
char* output,
int* length );
404 unsigned int strLength;
410 MAX_ENTITY_LENGTH = 6
413 static Entity entity[ NUM_ENTITY ];
414 static bool condenseWhiteSpace;
435 friend std::istream& operator >> (std::istream& in,
TiXmlNode& base);
453 friend std::ostream& operator<< (std::ostream& out,
const TiXmlNode& base);
456 friend std::string& operator<< (std::string& out,
const TiXmlNode& base );
488 const char *
Value()
const {
return value.c_str (); }
495 const std::string& ValueStr()
const {
return value; }
498 const TIXML_STRING& ValueTStr()
const {
return value; }
509 void SetValue(
const char * _value) { value = _value;}
512 void SetValue(
const std::string& _value ) { value = _value; }
530 return const_cast< TiXmlNode*
> ((
const_cast< const TiXmlNode*
>(
this))->FirstChild( _value ));
532 const TiXmlNode* LastChild()
const {
return lastChild; }
535 const TiXmlNode* LastChild(
const char * value )
const;
537 return const_cast< TiXmlNode*
> ((
const_cast< const TiXmlNode*
>(
this))->LastChild( _value ));
543 const TiXmlNode* LastChild(
const std::string& _value )
const {
return LastChild (_value.c_str ()); }
544 TiXmlNode* LastChild(
const std::string& _value ) {
return LastChild (_value.c_str ()); }
565 return const_cast< TiXmlNode*
>( (
const_cast< const TiXmlNode*
>(
this))->IterateChildren( previous ) );
571 return const_cast< TiXmlNode*
>( (
const_cast< const TiXmlNode*
>(
this))->IterateChildren( _value, previous ) );
621 return const_cast< TiXmlNode*
>( (
const_cast< const TiXmlNode*
>(
this))->PreviousSibling( _prev ) );
638 return const_cast< TiXmlNode*
>( (
const_cast< const TiXmlNode*
>(
this))->NextSibling( _next ) );
656 return const_cast< TiXmlElement*
>( (
const_cast< const TiXmlNode*
>(
this))->NextSiblingElement( _next ) );
673 return const_cast< TiXmlElement*
>( (
const_cast< const TiXmlNode*
>(
this))->FirstChildElement( _value ) );
685 int Type()
const {
return type; }
750 virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
754 TiXmlNode* Identify(
const char* start, TiXmlEncoding encoding );
782 friend class TiXmlAttributeSet;
793 TiXmlAttribute(
const std::string& _name,
const std::string& _value )
812 const char*
Name()
const {
return name.c_str(); }
813 const char*
Value()
const {
return value.c_str(); }
815 const std::string& ValueStr()
const {
return value; }
821 const TIXML_STRING& NameTStr()
const {
return name; }
836 void SetName(
const char* _name ) { name = _name; }
837 void SetValue(
const char* _value ) { value = _value; }
843 void SetName(
const std::string& _name ) { name = _name; }
846 void SetValue(
const std::string& _value ) { value = _value; }
861 bool operator==(
const TiXmlAttribute& rhs )
const {
return rhs.name == name; }
862 bool operator<(
const TiXmlAttribute& rhs )
const {
return name < rhs.name; }
863 bool operator>(
const TiXmlAttribute& rhs )
const {
return name > rhs.name; }
868 virtual const char* Parse(
const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
871 virtual void Print( FILE* cfile,
int depth )
const {
872 Print( cfile, depth, 0 );
874 void Print( FILE* cfile,
int depth, TIXML_STRING* str )
const;
904 class TiXmlAttributeSet
908 ~TiXmlAttributeSet();
913 const TiXmlAttribute* First()
const {
return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
914 TiXmlAttribute* First() {
return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
915 const TiXmlAttribute* Last()
const {
return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
916 TiXmlAttribute* Last() {
return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
920 return const_cast< TiXmlAttribute*
>( (
const_cast< const TiXmlAttributeSet*
>(
this))->Find( _name ) );
925 return const_cast< TiXmlAttribute*
>( (
const_cast< const TiXmlAttributeSet*
>(
this))->Find( _name ) );
933 TiXmlAttributeSet(
const TiXmlAttributeSet& );
934 void operator=(
const TiXmlAttributeSet& );
964 const char*
Attribute(
const char* name )
const;
972 const char*
Attribute(
const char* name,
int* i )
const;
980 const char*
Attribute(
const char* name,
double* d )
const;
996 if ( result == TIXML_SUCCESS ) {
1002 #ifdef TIXML_USE_STL
1011 template<
typename T >
int QueryValueAttribute(
const std::string& name, T* outValue )
const
1015 return TIXML_NO_ATTRIBUTE;
1017 std::stringstream sstream( node->ValueStr() );
1018 sstream >> *outValue;
1019 if ( !sstream.fail() )
1020 return TIXML_SUCCESS;
1021 return TIXML_WRONG_TYPE;
1043 void SetAttribute(
const char* name,
const char * _value );
1045 #ifdef TIXML_USE_STL
1046 const std::string*
Attribute(
const std::string& name )
const;
1047 const std::string*
Attribute(
const std::string& name,
int* i )
const;
1048 const std::string*
Attribute(
const std::string& name,
double* d )
const;
1053 void SetAttribute(
const std::string& name,
const std::string& _value );
1055 void SetAttribute(
const std::string& name,
int _value );
1071 #ifdef TIXML_USE_STL
1117 virtual void Print( FILE* cfile,
int depth )
const;
1122 virtual const char* Parse(
const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1137 #ifdef TIXML_USE_STL
1138 virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1144 const char* ReadValue(
const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
1148 TiXmlAttributeSet attributeSet;
1171 virtual void Print( FILE* cfile,
int depth )
const;
1176 virtual const char* Parse(
const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1189 #ifdef TIXML_USE_STL
1190 virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1219 #ifdef TIXML_USE_STL
1229 void operator=(
const TiXmlText& base ) { base.CopyTo(
this ); }
1232 virtual void Print( FILE* cfile,
int depth )
const;
1239 virtual const char* Parse(
const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1255 #ifdef TIXML_USE_STL
1256 virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1283 #ifdef TIXML_USE_STL
1286 const std::string& _encoding,
1287 const std::string& _standalone );
1292 const char* _encoding,
1293 const char* _standalone );
1301 const char *
Version()
const {
return version.c_str (); }
1303 const char *
Encoding()
const {
return encoding.c_str (); }
1310 virtual void Print( FILE* cfile,
int depth, TIXML_STRING* str )
const;
1311 virtual void Print( FILE* cfile,
int depth )
const {
1312 Print( cfile, depth, 0 );
1315 virtual const char* Parse(
const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1327 #ifdef TIXML_USE_STL
1328 virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1333 TIXML_STRING version;
1334 TIXML_STRING encoding;
1335 TIXML_STRING standalone;
1353 void operator=(
const TiXmlUnknown& copy ) { copy.CopyTo(
this ); }
1358 virtual void Print( FILE* cfile,
int depth )
const;
1360 virtual const char* Parse(
const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1372 #ifdef TIXML_USE_STL
1373 virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1393 #ifdef TIXML_USE_STL
1407 bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1411 bool LoadFile(
const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1413 bool SaveFile(
const char * filename )
const;
1419 bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1423 #ifdef TIXML_USE_STL
1424 bool LoadFile(
const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )
1428 return LoadFile( filename.c_str(), encoding );
1430 bool SaveFile(
const std::string& filename )
const
1434 return SaveFile( filename.c_str() );
1442 virtual const char*
Parse(
const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1459 const char *
ErrorDesc()
const {
return errorDesc.c_str (); }
1502 int TabSize()
const {
return tabsize; }
1510 errorLocation.row = errorLocation.col = 0;
1524 virtual void Print( FILE* cfile,
int depth = 0 )
const;
1526 void SetError(
int err,
const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
1538 #ifdef TIXML_USE_STL
1539 virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1547 TIXML_STRING errorDesc;
1549 TiXmlCursor errorLocation;
1550 bool useMicrosoftBOM;
1671 #ifdef TIXML_USE_STL
1675 TiXmlHandle Child(
const std::string& _value,
int index )
const {
return Child( _value.c_str(), index ); }
1737 buffer(), indent(
" " ), lineBreak(
"\n" ) {}
1753 void SetIndent(
const char* _indent ) { indent = _indent ? _indent :
"" ; }
1755 const char*
Indent() {
return indent.c_str(); }
1760 void SetLineBreak(
const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak :
""; }
1771 const char*
CStr() {
return buffer.c_str(); }
1773 size_t Size() {
return buffer.size(); }
1775 #ifdef TIXML_USE_STL
1776 const std::string& Str() {
return buffer; }
1782 for(
int i=0; i<depth; ++i )
1785 void DoLineBreak() {
1786 buffer += lineBreak;
1790 bool simpleTextPrint;
1791 TIXML_STRING buffer;
1792 TIXML_STRING indent;
1793 TIXML_STRING lineBreak;
1798 #pragma warning( pop )
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null not of the requested type.
TiXmlNode * Parent()
One step up the DOM.
TiXmlHandle FirstChildElement() const
Return a handle to the first child element.
void SetDoubleAttribute(const char *name, double value)
void SetTabSize(int _tabsize)
virtual TiXmlNode * Clone() const
Creates a copy of this Declaration and returns it.
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
void SetCDATA(bool _cdata)
Turns on or off a CDATA representation of text.
const char * Version() const
Version. Will return an empty string if none was found.
int QueryDoubleAttribute(const char *name, double *_value) const
QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
int Column() const
See Row()
virtual TiXmlNode * Clone() const =0
const char * Standalone() const
Is this a standalone document?
static void SetCondenseWhiteSpace(bool condense)
bool SaveFile() const
Save a file using the current document value. Returns true if successful.
void SetDoubleValue(double _value)
Set the value from a double.
size_t Size()
Return the length of the result string.
void RemoveAttribute(const char *name)
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
TiXmlHandle(TiXmlNode *_node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
virtual bool Accept(TiXmlVisitor *visitor) const
virtual bool VisitEnter(const TiXmlElement &, const TiXmlAttribute *)
Visit an element.
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null not of the requested type.
void SetIntValue(int _value)
Set the value from an integer.
TiXmlDocument()
Create an empty document, that has no name.
void SetIndent(const char *_indent)
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null not of the requested type.
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null if not of the requested type.
virtual TiXmlNode * Clone() const
Creates a copy of this Unknown and returns it.
const char * Value() const
const void * GetUserData() const
Get a pointer to arbitrary user data.
TiXmlElement * Element() const
TiXmlElement * ToElement() const
int IntValue() const
Return the value of this attribute, converted to an integer.
int QueryIntAttribute(const char *name, int *_value) const
const char * Name() const
Return the name of this attribute.
const TiXmlAttribute * Previous() const
Get the previous sibling attribute in the DOM. Returns null at beginning.
virtual void Print(FILE *cfile, int depth) const
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null if not of the requested type.
virtual TiXmlNode * Clone() const
Creates a new Element and returns it - the returned element is a copy.
const TiXmlAttribute * LastAttribute() const
Access the last attribute in this element.
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null not of the requested type.
int QueryFloatAttribute(const char *name, float *_value) const
QueryFloatAttribute examines the attribute - see QueryIntAttribute().
int ErrorCol() const
The column where the error occured. See ErrorRow()
TiXmlUnknown * ToUnknown() const
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
virtual bool Accept(TiXmlVisitor *visitor) const
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
TiXmlText(const char *initValue)
int QueryIntValue(int *_value) const
virtual bool VisitExit(const TiXmlElement &)
Visit an element.
virtual bool Visit(const TiXmlComment &)
Visit a comment node.
void SetName(const char *_name)
Set the name of this attribute.
TiXmlAttribute()
Construct an empty attribute.
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null not of the requested type.
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null if not of the requested type.
virtual bool Visit(const TiXmlText &)
Visit a text node.
const TiXmlAttribute * FirstAttribute() const
Access the first attribute in this element.
void Clear()
Delete all the children of this node. Does not affect 'this'.
virtual bool Accept(TiXmlVisitor *content) const
virtual bool VisitEnter(const TiXmlDocument &)
Visit a document.
const TiXmlElement * NextSiblingElement() const
TiXmlElement(const char *in_value)
Construct an element.
virtual bool Visit(const TiXmlUnknown &)
Visit an unknow node.
TiXmlDeclaration()
Construct an empty declaration.
bool NoChildren() const
Returns true if this node has no children.
virtual TiXmlNode * Clone() const
[internal use] Creates a new Element and returns it.
static void EncodeString(const TIXML_STRING &str, TIXML_STRING *out)
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null not of the requested type.
virtual TiXmlNode * Clone() const
virtual bool Accept(TiXmlVisitor *visitor) const =0
void * userData
Field containing a generic user pointer.
const char * Attribute(const char *name) const
void SetValue(const char *_value)
Set the value.
virtual void Print(FILE *cfile, int depth) const
virtual bool Accept(TiXmlVisitor *content) const
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null if not of the requested type.
void * GetUserData()
Get a pointer to arbitrary user data.
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null not of the requested type.
const char * CStr()
Return the result.
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
virtual bool Visit(const TiXmlDeclaration &)
Visit a declaration.
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null if not of the requested type.
void SetAttribute(const char *name, const char *_value)
const char * Indent()
Query the indention string.
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null not of the requested type.
void SetValue(const char *_value)
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
const char * Encoding() const
Encoding. Will return an empty string if none was found.
static bool IsWhiteSpaceCondensed()
Return the current white space setting.
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null not of the requested type.
const char * GetText() const
virtual void Print(FILE *cfile, int depth) const
virtual void Print(FILE *cfile, int depth) const =0
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
virtual TiXmlComment * ToComment()
Cast to a more defined type. Will return null if not of the requested type.
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null if not of the requested type.
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null if not of the requested type.
virtual bool Accept(TiXmlVisitor *content) const
int QueryDoubleValue(double *_value) const
QueryDoubleValue examines the value string. See QueryIntValue().
bool LoadFile(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
void SetLineBreak(const char *_lineBreak)
TiXmlHandle FirstChild() const
Return a handle to the first child node.
TiXmlNode * LastChild(const char *_value)
The last child of this node matching 'value'. Will be null if there are no children.
virtual bool VisitExit(const TiXmlDocument &doc)
Visit a document.
virtual const TiXmlComment * ToComment() const
Cast to a more defined type. Will return null if not of the requested type.
TiXmlHandle Child(const char *value, int index) const
virtual bool VisitExit(const TiXmlDocument &)
Visit a document.
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null if not of the requested type.
const char * Value() const
Return the value of this attribute.
const char * LineBreak()
Query the current line breaking string.
const TiXmlAttribute * Next() const
Get the next sibling attribute in the DOM. Returns null at end.
TiXmlNode * LastChild()
The last child of this node. Will be null if there are no children.
const TiXmlDocument * GetDocument() const
virtual void Print(FILE *cfile, int depth) const
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null if not of the requested type.
const TiXmlNode * FirstChild() const
The first child of this node. Will be null if there are no children.
TiXmlUnknown * Unknown() const
void SetUserData(void *user)
Set a pointer to arbitrary user data.
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null if not of the requested type.
TiXmlHandle(const TiXmlHandle &ref)
Copy constructor.
virtual bool VisitEnter(const TiXmlDocument &doc)
Visit a document.
virtual void Print(FILE *cfile, int depth) const
double DoubleValue() const
Return the value of this attribute, converted to a double.
bool CDATA() const
Queries whether this represents text using a CDATA section.
const TiXmlElement * RootElement() const
TiXmlNode * ToNode() const
TiXmlHandle ChildElement(const char *value, int index) const
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null not of the requested type.
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
TiXmlText * ToText() const
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
virtual bool Visit(const TiXmlDeclaration &declaration)
Visit a declaration.
TiXmlAttribute(const char *_name, const char *_value)
Construct an attribute with a name and value.