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 ) 46 #ifdef TIXML_USE_TICPP 56 #define TIXML_STRING std::string 59 #define TIXML_STRING TiXmlString 69 #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) 71 #define TIXML_SNPRINTF _snprintf_s 72 #define TIXML_SNSCANF _snscanf_s 73 #define TIXML_SSCANF sscanf_s 74 #elif defined(_MSC_VER) && (_MSC_VER >= 1200 ) 77 #define TIXML_SNPRINTF _snprintf 78 #define TIXML_SNSCANF _snscanf 79 #define TIXML_SSCANF sscanf 80 #elif defined(__GNUC__) && (__GNUC__ >= 3 ) 83 #define TIXML_SNPRINTF snprintf 84 #define TIXML_SNSCANF snscanf 85 #define TIXML_SSCANF sscanf 87 #define TIXML_SSCANF sscanf 204 #ifdef TIXML_USE_TICPP 228 virtual void Print( FILE* cfile,
int depth )
const = 0;
270 virtual const char*
Parse(
const char* p,
307 return ( isspace( (
unsigned char) c ) || c ==
'\n' || c ==
'\r' );
317 static bool StreamWhiteSpace( std::istream * in,
TIXML_STRING * tag );
318 static bool StreamTo( std::istream * in,
int character,
TIXML_STRING * tag );
330 static const char*
ReadText(
const char* in,
332 bool ignoreWhiteSpace,
347 *length = utf8ByteTable[ *((
const unsigned char*)p) ];
348 assert( *length >= 0 && *length < 5 );
358 return GetEntity( p, _value, length, encoding );
366 for(
int i=0; p[i] && i<*length; ++i ) {
369 return p + (*length);
401 if ( v < 128 )
return tolower( v );
424 MAX_ENTITY_LENGTH = 6
545 return const_cast< TiXmlNode*
> ((
const_cast< const TiXmlNode*
>(
this))->FirstChild( _value ));
552 return const_cast< TiXmlNode*
> ((
const_cast< const TiXmlNode*
>(
this))->LastChild( _value ));
580 return const_cast< TiXmlNode*
>( (
const_cast< const TiXmlNode*
>(
this))->IterateChildren( previous ) );
586 return const_cast< TiXmlNode*
>( (
const_cast< const TiXmlNode*
>(
this))->IterateChildren( _value, previous ) );
636 return const_cast< TiXmlNode*
>( (
const_cast< const TiXmlNode*
>(
this))->PreviousSibling( _prev ) );
653 return const_cast< TiXmlNode*
>( (
const_cast< const TiXmlNode*
>(
this))->NextSibling( _next ) );
671 return const_cast< TiXmlElement*
>( (
const_cast< const TiXmlNode*
>(
this))->NextSiblingElement( _next ) );
688 return const_cast< TiXmlElement*
>( (
const_cast< const TiXmlNode*
>(
this))->FirstChildElement( _value ) );
767 virtual void StreamIn( std::istream* in,
TIXML_STRING* tag ) = 0;
829 const char*
Name()
const {
return name.c_str(); }
830 const char*
Value()
const {
return value.c_str(); }
832 const std::string& ValueStr()
const {
return value; }
834 int IntValue()
const;
835 double DoubleValue()
const;
849 int QueryIntValue(
int* _value )
const;
851 int QueryDoubleValue(
double* _value )
const;
853 void SetName(
const char* _name ) { name = _name; }
854 void SetValue(
const char* _value ) { value = _value; }
856 void SetIntValue(
int _value );
857 void SetDoubleValue(
double _value );
860 void SetName(
const std::string& _name ) { name = _name; }
863 void SetValue(
const std::string& _value ) { value = _value; }
888 virtual void Print( FILE* cfile,
int depth )
const {
889 Print( cfile, depth, 0 );
891 void Print( FILE* cfile,
int depth,
TIXML_STRING* str )
const;
981 const char* Attribute(
const char* name )
const;
989 const char* Attribute(
const char* name,
int* i )
const;
997 const char* Attribute(
const char* name,
double* d )
const;
1006 int QueryIntAttribute(
const char* name,
int* _value )
const;
1008 int QueryDoubleAttribute(
const char* name,
double* _value )
const;
1012 int result = QueryDoubleAttribute( name, &d );
1019 #ifdef TIXML_USE_STL 1028 template<
typename T >
int QueryValueAttribute(
const std::string& name,
T* outValue )
const 1034 std::stringstream sstream( node->ValueStr() );
1035 sstream >> *outValue;
1036 if ( !sstream.fail() )
1060 void SetAttribute(
const char* name,
const char * _value );
1062 #ifdef TIXML_USE_STL 1066 int QueryIntAttribute(
const std::string& name,
int* _value )
const;
1067 int QueryDoubleAttribute(
const std::string& name,
double* _value )
const;
1072 void SetAttribute(
const std::string& name,
int _value );
1078 void SetAttribute(
const char * name,
int value );
1083 void SetDoubleAttribute(
const char * name,
double value );
1087 void RemoveAttribute(
const char * name );
1088 #ifdef TIXML_USE_STL 1089 void RemoveAttribute(
const std::string& name ) { RemoveAttribute (name.c_str ()); }
1129 const char* GetText()
const;
1134 virtual void Print( FILE* cfile,
int depth )
const;
1154 #ifdef TIXML_USE_STL 1155 virtual void StreamIn( std::istream * in,
TIXML_STRING * tag );
1188 virtual void Print( FILE* cfile,
int depth )
const;
1206 #ifdef TIXML_USE_STL 1207 virtual void StreamIn( std::istream * in,
TIXML_STRING * tag );
1236 #ifdef TIXML_USE_STL 1249 virtual void Print( FILE* cfile,
int depth )
const;
1272 #ifdef TIXML_USE_STL 1273 virtual void StreamIn( std::istream * in,
TIXML_STRING * tag );
1300 #ifdef TIXML_USE_STL 1309 const char* _encoding,
1310 const char* _standalone );
1320 const char *
Encoding()
const {
return encoding.c_str (); }
1327 virtual void Print( FILE* cfile,
int depth,
TIXML_STRING* str )
const;
1328 virtual void Print( FILE* cfile,
int depth )
const {
1329 Print( cfile, depth, 0 );
1344 #ifdef TIXML_USE_STL 1345 virtual void StreamIn( std::istream * in,
TIXML_STRING * tag );
1370 #ifdef TIXML_USE_STL 1378 const char* _href );
1386 const char *
Type()
const {
return type.c_str (); }
1388 const char *
Href()
const {
return href.c_str (); }
1393 virtual void Print( FILE* cfile,
int depth,
TIXML_STRING* str )
const;
1394 virtual void Print( FILE* cfile,
int depth )
const {
1395 Print( cfile, depth, 0 );
1410 #ifdef TIXML_USE_STL 1411 virtual void StreamIn( std::istream * in,
TIXML_STRING * tag );
1439 virtual void Print( FILE* cfile,
int depth )
const;
1453 #ifdef TIXML_USE_STL 1454 virtual void StreamIn( std::istream * in,
TIXML_STRING * tag );
1474 #ifdef TIXML_USE_STL 1490 bool SaveFile()
const;
1494 bool SaveFile(
const char * filename )
const;
1502 bool SaveFile( FILE* )
const;
1504 #ifdef TIXML_USE_STL 1509 return LoadFile( filename.c_str(), encoding );
1511 bool SaveFile(
const std::string& filename )
const 1515 return SaveFile( filename.c_str() );
1540 const char *
ErrorDesc()
const {
return errorDesc.c_str (); }
1591 errorLocation.row = errorLocation.col = 0;
1605 virtual void Print( FILE* cfile,
int depth = 0 )
const;
1619 #ifdef TIXML_USE_STL 1620 virtual void StreamIn( std::istream * in,
TIXML_STRING * tag );
1727 TiXmlHandle FirstChild(
const char * value )
const;
1731 TiXmlHandle FirstChildElement(
const char * value )
const;
1736 TiXmlHandle Child(
const char* value,
int index )
const;
1745 TiXmlHandle ChildElement(
const char* value,
int index )
const;
1752 #ifdef TIXML_USE_STL 1754 TiXmlHandle FirstChildElement(
const std::string& _value )
const {
return FirstChildElement( _value.c_str() ); }
1756 TiXmlHandle Child(
const std::string& _value,
int index )
const {
return Child( _value.c_str(), index ); }
1757 TiXmlHandle ChildElement(
const std::string& _value,
int index )
const {
return ChildElement( _value.c_str(), index ); }
1818 buffer(), indent(
" " ), lineBreak(
"\n" ) {}
1827 virtual bool Visit(
const TiXmlText& text );
1835 void SetIndent(
const char* _indent ) { indent = _indent ? _indent :
"" ; }
1837 const char*
Indent() {
return indent.c_str(); }
1842 void SetLineBreak(
const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak :
""; }
1853 const char*
CStr() {
return buffer.c_str(); }
1855 size_t Size() {
return buffer.size(); }
1857 #ifdef TIXML_USE_STL 1864 for(
int i=0; i<depth; ++i )
1868 buffer += lineBreak;
1880 #pragma warning( pop ) void ClearError()
If you have handled the error, it can be reset with this call.
Definition: tinyxml.h:1588
TiXmlAttribute * LastAttribute()
Definition: tinyxml.h:1095
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1444
virtual const TiXmlStylesheetReference * ToStylesheetReference() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1400
TIXML_STRING encoding
Definition: tinyxml.h:1351
TiXmlAttribute * Next()
Definition: tinyxml.h:868
Always the top level node.
Definition: tinyxml.h:1466
TiXmlBase()
Definition: tinyxml.h:216
const char * Href() const
Href. Will return an empty string if none was found.
Definition: tinyxml.h:1388
int errorId
Definition: tinyxml.h:1627
TiXmlNode * Parent()
One step up the DOM.
Definition: tinyxml.h:535
TiXmlCursor()
Definition: tinyxml.h:110
const char * str
Definition: tinyxml.h:417
void SetTabSize(int _tabsize)
SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to report the correct v...
Definition: tinyxml.h:1581
Definition: tinyxml.h:485
Definition: tinyxml.h:282
int ErrorId() const
Generally, you probably want the error string ( ErrorDesc() ).
Definition: tinyxml.h:1545
void operator=(const TiXmlText &base)
Definition: tinyxml.h:1246
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
Add a new node related to this.
Definition: tinyxml.cpp:183
static const char * ReadName(const char *p, TIXML_STRING *name, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:401
Definition: tinyxml.h:289
Definition: tinyxml.h:283
TiXmlHandle operator=(const TiXmlHandle &ref)
Definition: tinyxml.h:1722
const TIXML_STRING & NameTStr() const
Definition: tinyxml.h:838
static void version(void)
Definition: tolua.c:58
static const char * GetChar(const char *p, char *_value, int *length, TiXmlEncoding encoding)
Definition: tinyxml.h:342
void SetCDATA(bool _cdata)
Turns on or off a CDATA representation of text.
Definition: tinyxml.h:1254
TIXML_STRING value
Definition: tinyxml.h:903
NodeType
The types of XML nodes supported by TinyXml.
Definition: tinyxml.h:477
static const char * SkipWhiteSpace(const char *, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:314
const char * Version() const
Version. Will return an empty string if none was found.
Definition: tinyxml.h:1318
void CopyTo(TiXmlElement *target) const
Definition: tinyxml.cpp:823
Definition: tinyxml.h:285
int Type() const
Query the type (as an enumerated value, above) of this node.
Definition: tinyxml.h:700
virtual ~TiXmlDeclaration()
Definition: tinyxml.h:1315
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:1058
const TiXmlNode * LastChild() const
Definition: tinyxml.h:547
virtual TiXmlStylesheetReference * ToStylesheetReference()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1401
bool Error() const
If an error occurs, Error will be set to true.
Definition: tinyxml.h:1537
int Column() const
See Row()
Definition: tinyxml.h:260
const TiXmlAttribute * First() const
Definition: tinyxml.h:930
const char * Standalone() const
Is this a standalone document?
Definition: tinyxml.h:1322
TiXmlNode * firstChild
Definition: tinyxml.h:776
Any tag that tinyXml doesn't recognize is saved as an unknown.
Definition: tinyxml.h:1427
TiXmlNode * Node() const
Definition: tinyxml.h:1776
Definition: tinyxml.h:482
::std::string string
Definition: gtest-port.h:756
static void SetCondenseWhiteSpace(bool condense)
The world does not agree on whether white space should be kept or not.
Definition: tinyxml.h:236
A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly useful thi...
Definition: tinyxml.h:1715
static bool IsWhiteSpace(char c)
Definition: tinyxml.h:305
TiXmlUnknown()
Definition: tinyxml.h:1430
size_t Size()
Return the length of the result string.
Definition: tinyxml.h:1855
TiXmlNode * node
Definition: tinyxml.h:1791
Definition: tinyxml.h:293
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
Definition: tinyxml.cpp:317
TiXmlHandle(TiXmlNode *_node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
Definition: tinyxml.h:1719
virtual bool Accept(TiXmlVisitor *visitor) const
Walk the XML tree visiting this node and all of its children.
Definition: tinyxml.cpp:845
static void ConvertUTF32ToUTF8(unsigned long input, char *output, int *length)
Definition: tinyxmlparser.cpp:88
virtual bool VisitEnter(const TiXmlElement &, const TiXmlAttribute *)
Visit an element.
Definition: tinyxml.h:147
Definition: tinyxml.h:292
TiXmlStylesheetReference()
Construct an empty declaration.
Definition: tinyxml.h:1368
TIXML_STRING value
Definition: tinyxml.h:779
TiXmlElement * FirstChildElement(const char *_value)
Definition: tinyxml.h:687
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1258
TiXmlText * Text() const
Definition: tinyxml.h:1784
const int TIXML_PATCH_VERSION
Definition: tinyxml.h:103
TIXML_STRING type
Definition: tinyxml.h:1416
void SetIndent(const char *_indent)
Set the indent characters for printing.
Definition: tinyxml.h:1835
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1259
TIXML_STRING version
Definition: tinyxml.h:1350
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:724
Definition: tinyxml.h:108
static int IsAlphaNum(unsigned char anyByte, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:150
const char * Value() const
The meaning of 'value' changes for the specific type of TiXmlNode.
Definition: tinyxml.h:503
const void * GetUserData() const
Get a pointer to arbitrary user data.
Definition: tinyxml.h:264
virtual ~TiXmlBase()
Definition: tinyxml.h:217
bool error
Definition: tinyxml.h:1626
TiXmlElement * Element() const
Definition: tinyxml.h:1780
TiXmlDocument * GetDocument()
Definition: tinyxml.h:706
std::ostream & operator<<(std::ostream &os, const Message &sb)
Definition: gtest-message.h:224
void Clear()
Definition: tinyxml.h:111
TiXmlElement * ToElement() const
Return the handle as a TiXmlElement.
Definition: tinyxml.h:1765
TiXmlPrinter()
Definition: tinyxml.h:1817
static bool IsWhiteSpace(int c)
Definition: tinyxml.h:309
TIXML_STRING errorDesc
Definition: tinyxml.h:1628
const char * Name() const
Return the name of this attribute.
Definition: tinyxml.h:829
Definition: tinyxml.h:175
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 ...
Definition: tinyxml.h:1328
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:721
static void error(char *o)
Definition: tolua.c:79
virtual TiXmlNode * Clone() const
Creates a new Element and returns it - the returned element is a copy.
Definition: tinyxml.cpp:859
void CopyTo(TiXmlText *target) const
Definition: tinyxml.cpp:1355
The parent class for everything in the Document Object Model.
Definition: tinyxml.h:438
TiXmlAttribute * First()
Definition: tinyxml.h:931
const TiXmlAttribute * LastAttribute() const
Access the last attribute in this element.
Definition: tinyxml.h:1094
const TiXmlNode * Parent() const
Definition: tinyxml.h:536
Definition: tinyxml.h:168
static const char * GetEntity(const char *in, char *value, int *length, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:438
TIXML_STRING lineBreak
Definition: tinyxml.h:1875
bool operator>(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:880
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1609
TIXML_STRING standalone
Definition: tinyxml.h:1352
Definition: tinyxml.h:286
int QueryFloatAttribute(const char *name, float *_value) const
QueryFloatAttribute examines the attribute - see QueryIntAttribute().
Definition: tinyxml.h:1010
void SetStreamPrinting()
Switch over to "stream printing" which is the most dense formatting without linebreaks.
Definition: tinyxml.h:1849
TiXmlAttribute * Find(const char *_name)
Definition: tinyxml.h:936
virtual const TiXmlStylesheetReference * ToStylesheetReference() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:719
Definition: tinyxml.h:486
int ErrorCol() const
The column where the error occured. See ErrorRow()
Definition: tinyxml.h:1555
int ErrorRow() const
Returns the location (if known) of the error.
Definition: tinyxml.h:1554
TiXmlNode * lastChild
Definition: tinyxml.h:777
TiXmlUnknown * ToUnknown() const
Return the handle as a TiXmlUnknown.
Definition: tinyxml.h:1771
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:630
bool useMicrosoftBOM
Definition: tinyxml.h:1631
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
Replace a child of this node.
Definition: tinyxml.cpp:289
Definition: tinyxml.h:176
Definition: tinyxml.h:294
TiXmlText(const char *initValue)
Constructor for text element.
Definition: tinyxml.h:1229
Definition: tinyxml.h:297
virtual bool VisitExit(const TiXmlElement &)
Visit an element.
Definition: tinyxml.h:149
virtual bool Visit(const TiXmlComment &)
Visit a comment node.
Definition: tinyxml.h:158
TiXmlAttributeSet attributeSet
Definition: tinyxml.h:1165
TiXmlNode * prev
Definition: tinyxml.h:781
void SetName(const char *_name)
Set the name of this attribute.
Definition: tinyxml.h:853
const TiXmlEncoding TIXML_DEFAULT_ENCODING
Definition: tinyxml.h:180
TiXmlAttribute()
Construct an empty attribute.
Definition: tinyxml.h:803
virtual ~TiXmlText()
Definition: tinyxml.h:1234
TiXmlAttribute * next
Definition: tinyxml.h:905
Definition: tinyxml.h:281
TiXmlText(const TiXmlText ©)
Definition: tinyxml.h:1245
TiXmlDocument * document
Definition: tinyxml.h:901
int col
Definition: tinyxml.h:114
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Parse the given null terminated block of xml data.
Definition: tinyxmlparser.cpp:704
An attribute is a name-value pair.
Definition: tinyxml.h:797
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1335
TiXmlNode(NodeType _type)
Definition: tinyxml.cpp:134
TIXML_STRING name
Definition: tinyxml.h:902
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:726
Definition: tinyxml.h:291
const int TIXML_MAJOR_VERSION
Definition: tinyxml.h:101
bool operator==(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:878
virtual bool Visit(const TiXmlText &)
Visit a text node.
Definition: tinyxml.h:156
bool operator<(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:879
const TiXmlAttribute * FirstAttribute() const
Access the first attribute in this element.
Definition: tinyxml.h:1092
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 ...
Definition: tinyxml.h:1394
void DoIndent()
Definition: tinyxml.h:1863
void DoLineBreak()
Definition: tinyxml.h:1867
TiXmlBase is a base class for every class in TinyXml.
Definition: tinyxml.h:208
TiXmlElement * NextSiblingElement(const char *_next)
Definition: tinyxml.h:670
TiXmlNode * next
Definition: tinyxml.h:782
virtual bool VisitEnter(const TiXmlDocument &)
Visit a document.
Definition: tinyxml.h:142
Definition: tinyxmlparser.cpp:171
In correct XML the declaration is the first entry in the file.
Definition: tinyxml.h:1294
const TiXmlElement * NextSiblingElement() const
Convenience function to get through elements.
Definition: tinyxml.cpp:460
static const int utf8ByteTable[256]
Definition: tinyxml.h:268
TiXmlNode * FirstChild()
Definition: tinyxml.h:539
Definition: tinyxml.h:415
void operator=(const TiXmlAttributeSet &)
virtual bool Visit(const TiXmlUnknown &)
Visit an unknow node.
Definition: tinyxml.h:160
void operator=(const TiXmlElement &base)
Definition: tinyxml.cpp:529
TiXmlDeclaration()
Construct an empty declaration.
Definition: tinyxml.h:1298
bool NoChildren() const
Returns true if this node has no children.
Definition: tinyxml.h:711
TiXmlEncoding
Definition: tinyxml.h:173
static const char * ReadText(const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:574
TiXmlElement * NextSiblingElement()
Definition: tinyxml.h:661
static void EncodeString(const TIXML_STRING &str, TIXML_STRING *out)
Expands entities in a string.
Definition: tinyxml.cpp:50
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1141
NodeType type
Definition: tinyxml.h:774
char chr
Definition: tinyxml.h:419
TiXmlAttribute sentinel
Definition: tinyxml.h:953
void * userData
Field containing a generic user pointer.
Definition: tinyxml.h:391
Definition: tinyxml.h:480
unsigned int strLength
Definition: tinyxml.h:418
void SetValue(const char *_value)
Set the value.
Definition: tinyxml.h:854
bool cdata
Definition: tinyxml.h:1277
bool IsAlpha(char ch)
Definition: gtest-port.h:1511
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 ...
Definition: tinyxml.h:888
A stylesheet reference looks like this:
Definition: tinyxml.h:1364
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
Add a new node related to this.
Definition: tinyxml.cpp:257
Definition: InputPrereqs.h:78
If you call the Accept() method, it requires being passed a TiXmlVisitor class to handle callbacks...
Definition: tinyxml.h:136
Definition: tinyxml.h:166
void operator=(const TiXmlDocument ©)
Definition: tinyxml.cpp:916
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:717
static int ToLower(int v, TiXmlEncoding encoding)
Definition: tinyxml.h:397
void * GetUserData()
Get a pointer to arbitrary user data.
Definition: tinyxml.h:263
int depth
Definition: tinyxml.h:1871
const TIXML_STRING & ValueTStr() const
Definition: tinyxml.h:513
Definition: tinyxml.h:167
TIXML_STRING indent
Definition: tinyxml.h:1874
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1610
const char * CStr()
Return the result.
Definition: tinyxml.h:1853
int tabsize
Definition: tinyxml.h:1629
TiXmlNode * NextSibling(const char *_next)
Definition: tinyxml.h:652
TiXmlElement * RootElement()
Definition: tinyxml.h:1530
Definition: tinyxml.h:479
const char * Type() const
Type. Will return an empty string if none was found.
Definition: tinyxml.h:1386
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:647
virtual bool Visit(const TiXmlDeclaration &)
Visit a declaration.
Definition: tinyxml.h:152
int row
Definition: tinyxml.h:113
void CopyTo(TiXmlUnknown *target) const
Definition: tinyxml.cpp:1552
bool simpleTextPrint
Definition: tinyxml.h:1872
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:714
const char * Indent()
Query the indention string.
Definition: tinyxml.h:1837
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1334
void SetValue(const char *_value)
Changes the value of the node.
Definition: tinyxml.h:524
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
An alternate way to walk the children of a node.
Definition: tinyxml.cpp:363
XML text.
Definition: tinyxml.h:1221
const char * Encoding() const
Encoding. Will return an empty string if none was found.
Definition: tinyxml.h:1320
TiXmlAttribute * prev
Definition: tinyxml.h:904
void Print() const
Write the document to standard out using formatted printing ("pretty print").
Definition: tinyxml.h:1596
Definition: tinyxml.h:288
static bool IsWhiteSpaceCondensed()
Return the current white space setting.
Definition: tinyxml.h:239
virtual TiXmlStylesheetReference * ToStylesheetReference()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:727
TiXmlAttribute * Last()
Definition: tinyxml.h:933
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1443
static bool StringEqual(const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:534
Definition: tinyxml.h:484
TiXmlAttribute * FirstAttribute()
Definition: tinyxml.h:1093
int TabSize() const
Definition: tinyxml.h:1583
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
Add a new node related to this.
Definition: tinyxml.cpp:225
virtual TiXmlComment * ToComment()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:723
virtual ~TiXmlStylesheetReference()
Definition: tinyxml.h:1383
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:713
Definition: tinyxml.h:296
virtual ~TiXmlVisitor()
Definition: tinyxml.h:139
Definition: tinyxml.h:483
Definition: tinyxml.h:290
void SetDocument(TiXmlDocument *doc)
Definition: tinyxml.h:895
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:718
Definition: tinyxml.h:921
Definition: tinyxml.h:295
TiXmlNode * parent
Definition: tinyxml.h:773
The element is a container class.
Definition: tinyxml.h:961
TiXmlElement * FirstChildElement()
Definition: tinyxml.h:681
int Row() const
Return the position, in the original source file, of this node or attribute.
Definition: tinyxml.h:259
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
Definition: tinyxml.h:1540
TiXmlNode * PreviousSibling(const char *_prev)
Definition: tinyxml.h:635
TiXmlNode * Identify(const char *start, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:818
void SetLineBreak(const char *_lineBreak)
Set the line breaking string.
Definition: tinyxml.h:1842
TiXmlNode * LastChild(const char *_value)
The last child of this node matching 'value'. Will be null if there are no children.
Definition: tinyxml.h:551
static const char * errorString[TIXML_ERROR_STRING_COUNT]
Definition: tinyxml.h:386
Definition: tinyxml.h:287
virtual const TiXmlComment * ToComment() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:715
TiXmlUnknown(const TiXmlUnknown ©)
Definition: tinyxml.h:1433
virtual bool VisitExit(const TiXmlDocument &)
Visit a document.
Definition: tinyxml.h:144
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:725
TiXmlNode * PreviousSibling()
Definition: tinyxml.h:631
static bool condenseWhiteSpace
Definition: tinyxml.h:428
const char * Value() const
Return the value of this attribute.
Definition: tinyxml.h:830
Definition: tinyxml.h:481
virtual ~TiXmlDocument()
Definition: tinyxml.h:1482
TiXmlCursor errorLocation
Definition: tinyxml.h:1630
const char * LineBreak()
Query the current line breaking string.
Definition: tinyxml.h:1844
TIXML_STRING href
Definition: tinyxml.h:1417
TiXmlNode * LastChild()
The last child of this node. Will be null if there are no children.
Definition: tinyxml.h:548
const TiXmlDocument * GetDocument() const
Return a pointer to the Document this node lives in.
Definition: tinyxml.cpp:490
Print to memory functionality.
Definition: tinyxml.h:1814
TiXmlCursor location
Definition: tinyxml.h:388
TiXmlNode * IterateChildren(const TiXmlNode *previous)
Definition: tinyxml.h:579
Definition: tinyxml.h:299
Definition: tinyxml.h:284
TIXML_STRING buffer
Definition: tinyxml.h:1873
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:716
void operator=(const TiXmlUnknown ©)
Definition: tinyxml.h:1434
const TiXmlAttribute * Last() const
Definition: tinyxml.h:932
const TiXmlNode * FirstChild() const
The first child of this node. Will be null if there are no children.
Definition: tinyxml.h:538
TiXmlNode * IterateChildren(const char *_value, const TiXmlNode *previous)
Definition: tinyxml.h:585
TiXmlUnknown * Unknown() const
Definition: tinyxml.h:1788
void SetUserData(void *user)
Set a pointer to arbitrary user data.
Definition: tinyxml.h:262
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null if not of the requested type.
Definition: tinyxml.h:722
TiXmlHandle(const TiXmlHandle &ref)
Copy constructor.
Definition: tinyxml.h:1721
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 ...
Definition: tinyxml.cpp:770
virtual ~TiXmlUnknown()
Definition: tinyxml.h:1431
bool CDATA() const
Queries whether this represents text using a CDATA section.
Definition: tinyxml.h:1252
virtual bool Visit(const TiXmlStylesheetReference &)
Visit a stylesheet reference.
Definition: tinyxml.h:154
virtual ~TiXmlNode()
Definition: tinyxml.cpp:145
const TiXmlElement * RootElement() const
Get the root element – the only top level element – of the document.
Definition: tinyxml.h:1529
TiXmlNode * ToNode() const
Return the handle as a TiXmlNode.
Definition: tinyxml.h:1762
TiXmlNode * NextSibling()
Definition: tinyxml.h:648
#define TIXML_STRING
Definition: tinyxml.h:59
const int TIXML_MINOR_VERSION
Definition: tinyxml.h:102
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null not of the requested type.
Definition: tinyxml.h:1142
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
Definition: tinyxml.cpp:430
TiXmlText * ToText() const
Return the handle as a TiXmlText.
Definition: tinyxml.h:1768
ORX_FORCEINLINE bool operator>>(std::istream &instream, ToType &output)
Fallback operator >>() (delegates to orxonox::ConverterFallback)
Definition: Convert.h:249
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
Add a new node related to this.
Definition: tinyxml.cpp:210
Definition: tinyxml.h:177
TiXmlAttribute * Previous()
Definition: tinyxml.h:874
TiXmlAttribute(const char *_name, const char *_value)
Construct an attribute with a name and value.
Definition: tinyxml.h:821