Otclient  14/8/2020
tinyxml.h
Go to the documentation of this file.
1 /*
2 www.sourceforge.net/projects/tinyxml
3 Original code by Lee Thomason (www.grinninglizard.com)
4 
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any
7 damages arising from the use of this software.
8 
9 Permission is granted to anyone to use this software for any
10 purpose, including commercial applications, and to alter it and
11 redistribute it freely, subject to the following restrictions:
12 
13 1. The origin of this software must not be misrepresented; you must
14 not claim that you wrote the original software. If you use this
15 software in a product, an acknowledgment in the product documentation
16 would be appreciated but is not required.
17 
18 2. Altered source versions must be plainly marked as such, and
19 must not be misrepresented as being the original software.
20 
21 3. This notice may not be removed or altered from any source
22 distribution.
23 */
24 
25 
26 #ifndef TINYXML_INCLUDED
27 #define TINYXML_INCLUDED
28 
29 #define TIXML_USE_STL // use STL strings instead
30 
31 #ifdef _MSC_VER
32 #pragma warning( push )
33 #pragma warning( disable : 4530 )
34 #pragma warning( disable : 4786 )
35 #endif
36 
37 #include <ctype.h>
38 #include <stdio.h>
39 #include <stdlib.h>
40 #include <string.h>
41 #include <assert.h>
42 
43 #include <framework/const.h>
44 #include <framework/stdext/cast.h>
46 
47 // Help out windows:
48 #if defined( _DEBUG ) && !defined( DEBUG )
49 #define DEBUG
50 #endif
51 
52 #ifdef TIXML_USE_STL
53  #include <string>
54  #include <iostream>
55  #include <sstream>
56  #define TIXML_STRING std::string
57 #else
58  #include "tinystr.h"
59  #define TIXML_STRING TiXmlString
60 #endif
61 
62 // Deprecated library function hell. Compilers want to use the
63 // new safe versions. This probably doesn't fully address the problem,
64 // but it gets closer. There are too many compilers for me to fully
65 // test. If you get compilation troubles, undefine TIXML_SAFE
66 #define TIXML_SAFE
67 
68 #ifdef TIXML_SAFE
69  #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
70  // Microsoft visual studio, version 2005 and higher.
71  #define TIXML_SNPRINTF _snprintf_s
72  #define TIXML_SSCANF sscanf_s
73  #elif defined(_MSC_VER) && (_MSC_VER >= 1200 )
74  // Microsoft visual studio, version 6 and higher.
75  //#pragma message( "Using _sn* functions." )
76  #define TIXML_SNPRINTF _snprintf
77  #define TIXML_SSCANF sscanf
78  #elif defined(__GNUC__) && (__GNUC__ >= 3 )
79  // GCC version 3 and higher.s
80  //#warning( "Using sn* functions." )
81  #define TIXML_SNPRINTF snprintf
82  #define TIXML_SSCANF sscanf
83  #else
84  #define TIXML_SNPRINTF snprintf
85  #define TIXML_SSCANF sscanf
86  #endif
87 #endif
88 
89 class TiXmlDocument;
90 class TiXmlElement;
91 class TiXmlComment;
92 class TiXmlUnknown;
93 class TiXmlAttribute;
94 class TiXmlText;
95 class TiXmlDeclaration;
96 class TiXmlParsingData;
97 
98 const int TIXML_MAJOR_VERSION = 2;
99 const int TIXML_MINOR_VERSION = 6;
100 const int TIXML_PATCH_VERSION = 2;
101 
102 /* Internal structure for tracking location of items
103  in the XML file.
104 */
106 {
108  void Clear() { row = col = -1; }
109 
110  int row; // 0 based.
111  int col; // 0 based.
112 };
113 
114 
135 {
136 public:
137  virtual ~TiXmlVisitor() {}
138 
140  virtual bool VisitEnter( const TiXmlDocument& /*doc*/ ) { return true; }
142  virtual bool VisitExit( const TiXmlDocument& /*doc*/ ) { return true; }
143 
145  virtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ ) { return true; }
147  virtual bool VisitExit( const TiXmlElement& /*element*/ ) { return true; }
148 
150  virtual bool Visit( const TiXmlDeclaration& /*declaration*/ ) { return true; }
152  virtual bool Visit( const TiXmlText& /*text*/ ) { return true; }
154  virtual bool Visit( const TiXmlComment& /*comment*/ ) { return true; }
156  virtual bool Visit( const TiXmlUnknown& /*unknown*/ ) { return true; }
157 };
158 
159 // Only used by Attribute::Query functions
160 enum
161 {
165 };
166 
167 
168 // Used by the parsing routines.
170 {
174 };
175 static const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
199 {
200  friend class TiXmlNode;
201  friend class TiXmlElement;
202  friend class TiXmlDocument;
203 
204 public:
205  TiXmlBase( const TiXmlBase& ) = delete;
206  void operator=( const TiXmlBase& base ) = delete;
207 
208  TiXmlBase() : userData(0) {}
209  virtual ~TiXmlBase() {}
210 
220  virtual void Print( FILE* cfile, int depth ) const = 0;
221 
228  static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; }
229 
231  static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; }
232 
251  int Row() const { return location.row + 1; }
252  int Column() const { return location.col + 1; }
253 
254  void SetUserData( void* user ) { userData = user; }
255  void* GetUserData() { return userData; }
256  const void* GetUserData() const { return userData; }
257 
258  // Table that returs, for a given lead byte, the total number of bytes
259  // in the UTF-8 sequence.
260  static const int utf8ByteTable[256];
261 
262  virtual const char* Parse( const char* p,
263  TiXmlParsingData* data,
264  TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0;
265 
269  static void EncodeString( const TIXML_STRING& str, TIXML_STRING* out );
270 
271  enum
272  {
289 
291  };
292 
293 protected:
294 
295  static const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding );
296 
297  inline static bool IsWhiteSpace( char c )
298  {
299  return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' );
300  }
301  inline static bool IsWhiteSpace( int c )
302  {
303  if ( c < 256 )
304  return IsWhiteSpace( (char) c );
305  return false; // Again, only truly correct for English/Latin...but usually works.
306  }
307 
308  #ifdef TIXML_USE_STL
309  static bool StreamWhiteSpace( std::istream * in, TIXML_STRING * tag );
310  static bool StreamTo( std::istream * in, int character, TIXML_STRING * tag );
311  #endif
312 
313  /* Reads an XML name into the string provided. Returns
314  a pointer just past the last character of the name,
315  or 0 if the function has an error.
316  */
317  static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding );
318 
319  /* Reads text. Returns a pointer past the given end tag.
320  Wickedly complex options, but it keeps the (sensitive) code in one place.
321  */
322  static const char* ReadText( const char* in, // where to start
323  TIXML_STRING* text, // the string read
324  bool ignoreWhiteSpace, // whether to keep the white space
325  const char* endTag, // what ends this text
326  bool ignoreCase, // whether to ignore case in the end tag
327  TiXmlEncoding encoding ); // the current encoding
328 
329  // If an entity has been found, transform it into a character.
330  static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding );
331 
332  // Get a character, while interpreting entities.
333  // The length can be from 0 to 4 bytes.
334  inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding )
335  {
336  assert( p );
337  if ( encoding == TIXML_ENCODING_UTF8 )
338  {
339  *length = utf8ByteTable[ *((const unsigned char*)p) ];
340  assert( *length >= 0 && *length < 5 );
341  }
342  else
343  {
344  *length = 1;
345  }
346 
347  if ( *length == 1 )
348  {
349  if ( *p == '&' )
350  return GetEntity( p, _value, length, encoding );
351  *_value = *p;
352  return p+1;
353  }
354  else if ( *length )
355  {
356  //strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe),
357  // and the null terminator isn't needed
358  for( int i=0; p[i] && i<*length; ++i ) {
359  _value[i] = p[i];
360  }
361  return p + (*length);
362  }
363  else
364  {
365  // Not valid text.
366  return 0;
367  }
368  }
369 
370  // Return true if the next characters in the stream are any of the endTag sequences.
371  // Ignore case only works for english, and should only be relied on when comparing
372  // to English words: StringEqual( p, "version", true ) is fine.
373  static bool StringEqual( const char* p,
374  const char* endTag,
375  bool ignoreCase,
376  TiXmlEncoding encoding );
377 
378  static const char* errorString[ TIXML_ERROR_STRING_COUNT ];
379 
381 
383  void* userData;
384 
385  // None of these methods are reliable for any language except English.
386  // Good for approximation, not great for accuracy.
387  static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding );
388  static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding );
389  inline static int ToLower( int v, TiXmlEncoding encoding )
390  {
391  if ( encoding == TIXML_ENCODING_UTF8 )
392  {
393  if ( v < 128 ) return tolower( v );
394  return v;
395  }
396  else
397  {
398  return tolower( v );
399  }
400  }
401  static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );
402 
403 private:
404  struct Entity
405  {
406  const char* str;
407  unsigned int strLength;
408  char chr;
409  };
410  enum
411  {
412  NUM_ENTITY = 5,
413  MAX_ENTITY_LENGTH = 6
414 
415  };
416  static Entity entity[ NUM_ENTITY ];
417  static bool condenseWhiteSpace;
418 };
419 
420 
427 class TiXmlNode : public TiXmlBase
428 {
429  friend class TiXmlDocument;
430  friend class TiXmlElement;
431 
432 public:
433  TiXmlNode( const TiXmlNode& ) = delete;
434  void operator=( const TiXmlNode& base ) = delete;
435 
436  #ifdef TIXML_USE_STL
437 
441  friend std::istream& operator >> (std::istream& in, TiXmlNode& base);
442 
459  friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base);
460 
462  friend std::string& operator<< (std::string& out, const TiXmlNode& base );
463 
464  #endif
465 
469  enum NodeType
470  {
478  };
479 
480  virtual ~TiXmlNode();
481 
494  const char *Value() const { return value.c_str (); }
495 
496  #ifdef TIXML_USE_STL
497 
501  const std::string& ValueStr() const { return value; }
502  #endif
503 
504  const TIXML_STRING& ValueTStr() const { return value; }
505 
515  void SetValue(const char * _value) { value = _value;}
516 
517  #ifdef TIXML_USE_STL
518  void SetValue( const std::string& _value ) { value = _value; }
520  #endif
521 
523  void Clear();
524 
526  TiXmlNode* Parent() { return parent; }
527  const TiXmlNode* Parent() const { return parent; }
528 
529  const TiXmlNode* FirstChild() const { return firstChild; }
531  const TiXmlNode* FirstChild( const char * value ) const;
532  TiXmlNode* FirstChild( const char * _value ) {
534  // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)
535  // call the method, cast the return back to non-const.
536  return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value ));
537  }
538  const TiXmlNode* LastChild() const { return lastChild; }
540 
541  const TiXmlNode* LastChild( const char * value ) const;
542  TiXmlNode* LastChild( const char * _value ) {
543  return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value ));
544  }
545 
546  #ifdef TIXML_USE_STL
547  const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); }
548  TiXmlNode* FirstChild( const std::string& _value ) { return FirstChild (_value.c_str ()); }
549  const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); }
550  TiXmlNode* LastChild( const std::string& _value ) { return LastChild (_value.c_str ()); }
551  #endif
552 
569  const TiXmlNode* IterateChildren( const TiXmlNode* previous ) const;
570  TiXmlNode* IterateChildren( const TiXmlNode* previous ) {
571  return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) );
572  }
573 
575  const TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const;
576  TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) {
577  return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) );
578  }
579 
580  #ifdef TIXML_USE_STL
581  const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); }
582  TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); }
583  #endif
584 
588  TiXmlNode* InsertEndChild( const TiXmlNode& addThis );
589 
590 
600  TiXmlNode* LinkEndChild( TiXmlNode* addThis );
601 
605  TiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis );
606 
610  TiXmlNode* InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis );
611 
615  TiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis );
616 
618  bool RemoveChild( TiXmlNode* removeThis );
619 
621  const TiXmlNode* PreviousSibling() const { return prev; }
623 
625  const TiXmlNode* PreviousSibling( const char * ) const;
626  TiXmlNode* PreviousSibling( const char *_prev ) {
627  return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) );
628  }
629 
630  #ifdef TIXML_USE_STL
631  const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); }
632  TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); }
633  const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); }
634  TiXmlNode* NextSibling( const std::string& _value) { return NextSibling (_value.c_str ()); }
635  #endif
636 
638  const TiXmlNode* NextSibling() const { return next; }
639  TiXmlNode* NextSibling() { return next; }
640 
642  const TiXmlNode* NextSibling( const char * ) const;
643  TiXmlNode* NextSibling( const char* _next ) {
644  return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) );
645  }
646 
651  const TiXmlElement* NextSiblingElement() const;
653  return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() );
654  }
655 
660  const TiXmlElement* NextSiblingElement( const char * ) const;
661  TiXmlElement* NextSiblingElement( const char *_next ) {
662  return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) );
663  }
664 
665  #ifdef TIXML_USE_STL
666  const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); }
667  TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); }
668  #endif
669 
671  const TiXmlElement* FirstChildElement() const;
673  return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() );
674  }
675 
677  const TiXmlElement* FirstChildElement( const char * _value ) const;
678  TiXmlElement* FirstChildElement( const char * _value ) {
679  return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) );
680  }
681 
682  #ifdef TIXML_USE_STL
683  const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); }
684  TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); }
685  #endif
686 
691  int Type() const { return type; }
692 
696  const TiXmlDocument* GetDocument() const;
698  return const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() );
699  }
700 
702  bool NoChildren() const { return !firstChild; }
703 
704  virtual const TiXmlDocument* ToDocument() const { return 0; }
705  virtual const TiXmlElement* ToElement() const { return 0; }
706  virtual const TiXmlComment* ToComment() const { return 0; }
707  virtual const TiXmlUnknown* ToUnknown() const { return 0; }
708  virtual const TiXmlText* ToText() const { return 0; }
709  virtual const TiXmlDeclaration* ToDeclaration() const { return 0; }
710 
711  virtual TiXmlDocument* ToDocument() { return 0; }
712  virtual TiXmlElement* ToElement() { return 0; }
713  virtual TiXmlComment* ToComment() { return 0; }
714  virtual TiXmlUnknown* ToUnknown() { return 0; }
715  virtual TiXmlText* ToText() { return 0; }
716  virtual TiXmlDeclaration* ToDeclaration() { return 0; }
717 
721  virtual TiXmlNode* Clone() const = 0;
722 
745  virtual bool Accept( TiXmlVisitor* visitor ) const = 0;
746 
747 protected:
748  TiXmlNode( NodeType _type );
749 
750  // Copy to the allocated object. Shared functionality between Clone, Copy constructor,
751  // and the assignment operator.
752  void CopyTo( TiXmlNode* target ) const;
753 
754  #ifdef TIXML_USE_STL
755  // The real work of the input operator.
756  virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
757  #endif
758 
759  // Figure out what is at *p, and parse it. Returns null if it is not an xml node.
760  TiXmlNode* Identify( const char* start, TiXmlEncoding encoding );
761 
764 
767 
769 
772 };
773 
774 
782 class TiXmlAttribute : public TiXmlBase
783 {
784  friend class TiXmlAttributeSet;
785 
786 public:
789  {
790  document = 0;
791  prev = next = 0;
792  }
793 
794  #ifdef TIXML_USE_STL
795  TiXmlAttribute( const std::string& _name, const std::string& _value )
797  {
798  name = _name;
799  value = _value;
800  document = 0;
801  prev = next = 0;
802  }
803  #endif
804 
806  TiXmlAttribute( const char * _name, const char * _value )
807  {
808  name = _name;
809  value = _value;
810  document = 0;
811  prev = next = 0;
812  }
813 
814  const char* Name() const { return name.c_str(); }
815  const char* Value() const { return value.c_str(); }
816  #ifdef TIXML_USE_STL
817  const std::string& ValueStr() const { return value; }
818  #endif
819  int IntValue() const;
820  double DoubleValue() const;
821 
822  // Get the tinyxml string representation
823  const TIXML_STRING& NameTStr() const { return name; }
824 
834  int QueryIntValue( int* _value ) const;
836  int QueryDoubleValue( double* _value ) const;
837 
838  void SetName( const char* _name ) { name = _name; }
839  void SetValue( const char* _value ) { value = _value; }
840 
841  void SetIntValue( int _value );
842  void SetDoubleValue( double _value );
843 
844  #ifdef TIXML_USE_STL
845  void SetName( const std::string& _name ) { name = _name; }
848  void SetValue( const std::string& _value ) { value = _value; }
849  #endif
850 
852  const TiXmlAttribute* Next() const;
854  return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() );
855  }
856 
858  const TiXmlAttribute* Previous() const;
860  return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() );
861  }
862 
863  bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; }
864  bool operator<( const TiXmlAttribute& rhs ) const { return name < rhs.name; }
865  bool operator>( const TiXmlAttribute& rhs ) const { return name > rhs.name; }
866 
867  /* Attribute parsing starts: first letter of the name
868  returns: the next char after the value end quote
869  */
870  virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
871 
872  // Prints this Attribute to a FILE stream.
873  virtual void Print( FILE* cfile, int depth ) const {
874  Print( cfile, depth, 0 );
875  }
876  void Print( FILE* cfile, int depth, TIXML_STRING* str ) const;
877 
878  // [internal use]
879  // Set the document pointer so the attribute can report errors.
880  void SetDocument( TiXmlDocument* doc ) { document = doc; }
881 
882 private:
883  TiXmlAttribute( const TiXmlAttribute& ); // not implemented.
884  void operator=( const TiXmlAttribute& base ); // not allowed.
885 
886  TiXmlDocument* document; // A pointer back to a document, for error reporting.
887  TIXML_STRING name;
888  TIXML_STRING value;
889  TiXmlAttribute* prev;
890  TiXmlAttribute* next;
891 };
892 
893 
894 /* A class used to manage a group of attributes.
895  It is only used internally, both by the ELEMENT and the DECLARATION.
896 
897  The set can be changed transparent to the Element and Declaration
898  classes that use it, but NOT transparent to the Attribute
899  which has to implement a next() and previous() method. Which makes
900  it a bit problematic and prevents the use of STL.
901 
902  This version is implemented with circular lists because:
903  - I like circular lists
904  - it demonstrates some independence from the (typical) doubly linked list.
905 */
907 {
908 public:
911 
912  void Add( TiXmlAttribute* attribute );
913  void Remove( TiXmlAttribute* attribute );
914 
915  const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
916  TiXmlAttribute* First() { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
917  const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
918  TiXmlAttribute* Last() { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
919 
920  TiXmlAttribute* Find( const char* _name ) const;
921  TiXmlAttribute* FindOrCreate( const char* _name );
922 
923 # ifdef TIXML_USE_STL
924  TiXmlAttribute* Find( const std::string& _name ) const;
925  TiXmlAttribute* FindOrCreate( const std::string& _name );
926 # endif
927 
928 
929 private:
930  //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),
931  //*ME: this class must be also use a hidden/disabled copy-constructor !!!
932  TiXmlAttributeSet( const TiXmlAttributeSet& ); // not allowed
933  void operator=( const TiXmlAttributeSet& ); // not allowed (as TiXmlAttribute)
934 
935  TiXmlAttribute sentinel;
936 };
937 
938 
943 class TiXmlElement : public TiXmlNode
944 {
945 public:
946  TiXmlElement( const std::string& _value );
947  TiXmlElement( const TiXmlElement& );
948  TiXmlElement& operator=( const TiXmlElement& base );
949 
950  virtual ~TiXmlElement();
951 
952  template<typename T = std::string>
953  inline T readType(const std::string& str) const
954  {
955  T ret;
956  int r = QueryValueAttribute(str, &ret);
957  if(r == TIXML_NO_ATTRIBUTE || r == TIXML_WRONG_TYPE)
958  return T();
959  return ret;
960  }
961 
970  template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const
971  {
972  const TiXmlAttribute* node = attributeSet.Find( name );
973  if ( !node )
974  return TIXML_NO_ATTRIBUTE;
975 
976  std::stringstream sstream( node->ValueStr() );
977  sstream >> *outValue;
978  if ( !sstream.fail() )
979  return TIXML_SUCCESS;
980  return TIXML_WRONG_TYPE;
981  }
982 
983  int QueryValueAttribute( const std::string& name, std::string* outValue ) const
984  {
985  const TiXmlAttribute* node = attributeSet.Find( name );
986  if ( !node )
987  return TIXML_NO_ATTRIBUTE;
988  *outValue = node->ValueStr();
989  return TIXML_SUCCESS;
990  }
991 
992  std::string Attribute( const std::string& name ) const;
993  std::string Attribute( const std::string& name, int* i ) const;
994  std::string Attribute( const std::string& name, double* d ) const;
995 
996  void SetAttribute( const std::string& name, const std::string& _value );
997  void SetAttribute( const std::string& name, int _value) { SetAttribute(name, stdext::to_string(_value)); }
998 
999  void RemoveAttribute( const std::string& name );
1000 
1001  const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); }
1002  TiXmlAttribute* FirstAttribute() { return attributeSet.First(); }
1003  const TiXmlAttribute* LastAttribute() const { return attributeSet.Last(); }
1004  TiXmlAttribute* LastAttribute() { return attributeSet.Last(); }
1005 
1038  const char* GetText() const;
1039 
1041  virtual TiXmlNode* Clone() const;
1042  // Print the Element to a FILE stream.
1043  virtual void Print( FILE* cfile, int depth ) const;
1044 
1045  /* Attribtue parsing starts: next char past '<'
1046  returns: next char past '>'
1047  */
1048  virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1049 
1050  virtual const TiXmlElement* ToElement() const { return this; }
1051  virtual TiXmlElement* ToElement() { return this; }
1052 
1055  virtual bool Accept( TiXmlVisitor* visitor ) const;
1056 
1057 protected:
1058 
1059  void CopyTo( TiXmlElement* target ) const;
1060  void ClearThis(); // like clear, but initializes 'this' object as well
1061 
1062  // Used to be public [internal use]
1063  #ifdef TIXML_USE_STL
1064  virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1065  #endif
1066  /* [internal use]
1067  Reads the "value" of the element -- another element, or text.
1068  This should terminate with the current end tag.
1069  */
1070  const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
1071 
1072 private:
1073  TiXmlAttributeSet attributeSet;
1074 };
1075 
1076 
1079 class TiXmlComment : public TiXmlNode
1080 {
1081 public:
1085  TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {
1086  SetValue( _value );
1087  }
1088  TiXmlComment( const TiXmlComment& );
1089  TiXmlComment& operator=( const TiXmlComment& base );
1090 
1091  virtual ~TiXmlComment() {}
1092 
1094  virtual TiXmlNode* Clone() const;
1095  // Write this Comment to a FILE stream.
1096  virtual void Print( FILE* cfile, int depth ) const;
1097 
1098  /* Attribtue parsing starts: at the ! of the !--
1099  returns: next char past '>'
1100  */
1101  virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1102 
1103  virtual const TiXmlComment* ToComment() const { return this; }
1104  virtual TiXmlComment* ToComment() { return this; }
1105 
1108  virtual bool Accept( TiXmlVisitor* visitor ) const;
1109 
1110 protected:
1111  void CopyTo( TiXmlComment* target ) const;
1112 
1113  // used to be public
1114  #ifdef TIXML_USE_STL
1115  virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1116  #endif
1117 // virtual void StreamOut( TIXML_OSTREAM * out ) const;
1118 
1119 private:
1120 
1121 };
1122 
1123 
1129 class TiXmlText : public TiXmlNode
1130 {
1131  friend class TiXmlElement;
1132 public:
1137  TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
1138  {
1139  SetValue( initValue );
1140  cdata = false;
1141  }
1142  virtual ~TiXmlText() {}
1143 
1144  #ifdef TIXML_USE_STL
1145  TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
1147  {
1148  SetValue( initValue );
1149  cdata = false;
1150  }
1151  #endif
1152 
1153  TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); }
1154  TiXmlText& operator=( const TiXmlText& base ) { base.CopyTo( this ); return *this; }
1155 
1156  // Write this text object to a FILE stream.
1157  virtual void Print( FILE* cfile, int depth ) const;
1158 
1160  bool CDATA() const { return cdata; }
1162  void SetCDATA( bool _cdata ) { cdata = _cdata; }
1163 
1164  virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1165 
1166  virtual const TiXmlText* ToText() const { return this; }
1167  virtual TiXmlText* ToText() { return this; }
1168 
1171  virtual bool Accept( TiXmlVisitor* content ) const;
1172 
1173 protected :
1175  virtual TiXmlNode* Clone() const;
1176  void CopyTo( TiXmlText* target ) const;
1177 
1178  bool Blank() const; // returns true if all white space and new lines
1179  // [internal use]
1180  #ifdef TIXML_USE_STL
1181  virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1182  #endif
1183 
1184 private:
1185  bool cdata; // true if this should be input and output as a CDATA style text element
1186 };
1187 
1188 
1203 {
1204 public:
1207 
1208 #ifdef TIXML_USE_STL
1209  TiXmlDeclaration( const std::string& _version,
1211  const std::string& _encoding,
1212  const std::string& _standalone );
1213 #endif
1214 
1216  TiXmlDeclaration( const char* _version,
1217  const char* _encoding,
1218  const char* _standalone );
1219 
1220  TiXmlDeclaration( const TiXmlDeclaration& copy );
1222 
1223  virtual ~TiXmlDeclaration() {}
1224 
1226  const char *Version() const { return version.c_str (); }
1228  const char *Encoding() const { return encoding.c_str (); }
1230  const char *Standalone() const { return standalone.c_str (); }
1231 
1233  virtual TiXmlNode* Clone() const;
1234  // Print this declaration to a FILE stream.
1235  virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const;
1236  virtual void Print( FILE* cfile, int depth ) const {
1237  Print( cfile, depth, 0 );
1238  }
1239 
1240  virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1241 
1242  virtual const TiXmlDeclaration* ToDeclaration() const { return this; }
1243  virtual TiXmlDeclaration* ToDeclaration() { return this; }
1244 
1247  virtual bool Accept( TiXmlVisitor* visitor ) const;
1248 
1249 protected:
1250  void CopyTo( TiXmlDeclaration* target ) const;
1251  // used to be public
1252  #ifdef TIXML_USE_STL
1253  virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1254  #endif
1255 
1256 private:
1257 
1258  TIXML_STRING version;
1259  TIXML_STRING encoding;
1260  TIXML_STRING standalone;
1261 };
1262 
1263 
1271 class TiXmlUnknown : public TiXmlNode
1272 {
1273 public:
1275  virtual ~TiXmlUnknown() {}
1276 
1277  TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); }
1278  TiXmlUnknown& operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); return *this; }
1279 
1281  virtual TiXmlNode* Clone() const;
1282  // Print this Unknown to a FILE stream.
1283  virtual void Print( FILE* cfile, int depth ) const;
1284 
1285  virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1286 
1287  virtual const TiXmlUnknown* ToUnknown() const { return this; }
1288  virtual TiXmlUnknown* ToUnknown() { return this; }
1289 
1292  virtual bool Accept( TiXmlVisitor* content ) const;
1293 
1294 protected:
1295  void CopyTo( TiXmlUnknown* target ) const;
1296 
1297  #ifdef TIXML_USE_STL
1298  virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1299  #endif
1300 
1301 private:
1302 
1303 };
1304 
1305 
1310 class TiXmlDocument : public TiXmlNode
1311 {
1312 public:
1314  TiXmlDocument();
1316  TiXmlDocument( const char * documentName );
1317 
1318  #ifdef TIXML_USE_STL
1319  TiXmlDocument( const std::string& documentName );
1321  #endif
1322 
1323  TiXmlDocument( const TiXmlDocument& copy );
1324  TiXmlDocument& operator=( const TiXmlDocument& copy );
1325 
1326  virtual ~TiXmlDocument() {}
1327 
1332  bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1334  bool SaveFile() const;
1336  bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1338  bool SaveFile( const char * filename ) const;
1344  bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1346  bool SaveFile( FILE* ) const;
1347 
1348  #ifdef TIXML_USE_STL
1349  bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )
1350  {
1351  return LoadFile( filename.c_str(), encoding );
1352  }
1353  bool SaveFile( const std::string& filename ) const
1354  {
1355  return SaveFile( filename.c_str() );
1356  }
1357  #endif
1358 
1363  virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1364 
1369  const TiXmlElement* RootElement() const { return FirstChildElement(); }
1371 
1377  bool Error() const { return error; }
1378 
1380  const char * ErrorDesc() const { return errorDesc.c_str (); }
1381 
1385  int ErrorId() const { return errorId; }
1386 
1394  int ErrorRow() const { return errorLocation.row+1; }
1395  int ErrorCol() const { return errorLocation.col+1; }
1396 
1421  void SetTabSize( int _tabsize ) { tabsize = _tabsize; }
1422 
1423  int TabSize() const { return tabsize; }
1424 
1428  void ClearError() { error = false;
1429  errorId = 0;
1430  errorDesc = "";
1431  errorLocation.row = errorLocation.col = 0;
1432  //errorLocation.last = 0;
1433  }
1434 
1436  void Print() const { Print( stdout, 0 ); }
1437 
1438  /* Write the document to a string using formatted printing ("pretty print"). This
1439  will allocate a character array (new char[]) and return it as a pointer. The
1440  calling code pust call delete[] on the return char* to avoid a memory leak.
1441  */
1442  //char* PrintToMemory() const;
1443 
1445  virtual void Print( FILE* cfile, int depth = 0 ) const;
1446  // [internal use]
1447  void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
1448 
1449  virtual const TiXmlDocument* ToDocument() const { return this; }
1450  virtual TiXmlDocument* ToDocument() { return this; }
1451 
1454  virtual bool Accept( TiXmlVisitor* content ) const;
1455 
1456 protected :
1457  // [internal use]
1458  virtual TiXmlNode* Clone() const;
1459  #ifdef TIXML_USE_STL
1460  virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
1461  #endif
1462 
1463 private:
1464  void CopyTo( TiXmlDocument* target ) const;
1465 
1466  bool error;
1467  int errorId;
1468  TIXML_STRING errorDesc;
1469  int tabsize;
1470  TiXmlCursor errorLocation;
1471  bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write.
1472 };
1473 
1474 
1556 {
1557 public:
1559  TiXmlHandle( TiXmlNode* _node ) { this->node = _node; }
1561  TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; }
1562  TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; }
1563 
1565  TiXmlHandle FirstChild() const;
1567  TiXmlHandle FirstChild( const char * value ) const;
1571  TiXmlHandle FirstChildElement( const char * value ) const;
1572 
1576  TiXmlHandle Child( const char* value, int index ) const;
1580  TiXmlHandle Child( int index ) const;
1585  TiXmlHandle ChildElement( const char* value, int index ) const;
1590  TiXmlHandle ChildElement( int index ) const;
1591 
1592  #ifdef TIXML_USE_STL
1593  TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); }
1594  TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); }
1595 
1596  TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); }
1597  TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); }
1598  #endif
1599 
1602  TiXmlNode* ToNode() const { return node; }
1605  TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }
1608  TiXmlText* ToText() const { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); }
1611  TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }
1612 
1616  TiXmlNode* Node() const { return ToNode(); }
1620  TiXmlElement* Element() const { return ToElement(); }
1624  TiXmlText* Text() const { return ToText(); }
1628  TiXmlUnknown* Unknown() const { return ToUnknown(); }
1629 
1630 private:
1631  TiXmlNode* node;
1632 };
1633 
1634 
1655 {
1656 public:
1657  TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ),
1658  buffer(), indent( " " ), lineBreak( "\n" ) {}
1659 
1660  virtual bool VisitEnter( const TiXmlDocument& doc );
1661  virtual bool VisitExit( const TiXmlDocument& doc );
1662 
1663  virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute );
1664  virtual bool VisitExit( const TiXmlElement& element );
1665 
1666  virtual bool Visit( const TiXmlDeclaration& declaration );
1667  virtual bool Visit( const TiXmlText& text );
1668  virtual bool Visit( const TiXmlComment& comment );
1669  virtual bool Visit( const TiXmlUnknown& unknown );
1670 
1674  void SetIndent( const char* _indent ) { indent = _indent ? _indent : "" ; }
1676  const char* Indent() { return indent.c_str(); }
1681  void SetLineBreak( const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : ""; }
1683  const char* LineBreak() { return lineBreak.c_str(); }
1684 
1688  void SetStreamPrinting() { indent = "";
1689  lineBreak = "";
1690  }
1692  const char* CStr() { return buffer.c_str(); }
1694  size_t Size() { return buffer.size(); }
1695 
1696  #ifdef TIXML_USE_STL
1697  const std::string& Str() { return buffer; }
1699  #endif
1700 
1701 private:
1702  void DoIndent() {
1703  for( int i=0; i<depth; ++i )
1704  buffer += indent;
1705  }
1706  void DoLineBreak() {
1707  buffer += lineBreak;
1708  }
1709 
1710  int depth;
1711  bool simpleTextPrint;
1712  TIXML_STRING buffer;
1713  TIXML_STRING indent;
1714  TIXML_STRING lineBreak;
1715 };
1716 
1717 
1718 #ifdef _MSC_VER
1719 #pragma warning( pop )
1720 #endif
1721 
1722 #endif
TiXmlHandle::ToNode
TiXmlNode * ToNode() const
Definition: tinyxml.h:1602
TiXmlComment::TiXmlComment
TiXmlComment()
Constructs an empty comment.
Definition: tinyxml.h:1083
TiXmlNode::operator<<
friend std::ostream & operator<<(std::ostream &out, const TiXmlNode &base)
Definition: tinyxml.cpp:1412
TiXmlUnknown::~TiXmlUnknown
virtual ~TiXmlUnknown()
Definition: tinyxml.h:1275
TiXmlDeclaration::TiXmlDeclaration
TiXmlDeclaration()
Construct an empty declaration.
Definition: tinyxml.h:1206
TiXmlBase::TiXmlNode
friend class TiXmlNode
Definition: tinyxml.h:200
TiXmlBase::TIXML_ERROR_PARSING_UNKNOWN
@ TIXML_ERROR_PARSING_UNKNOWN
Definition: tinyxml.h:282
TiXmlAttributeSet::FindOrCreate
TiXmlAttribute * FindOrCreate(const char *_name)
Definition: tinyxml.cpp:1386
const.h
TiXmlText::Blank
bool Blank() const
Definition: tinyxmlparser.cpp:1635
TiXmlAttribute::TiXmlAttribute
TiXmlAttribute(const char *_name, const char *_value)
Construct an attribute with a name and value.
Definition: tinyxml.h:806
TiXmlVisitor::Visit
virtual bool Visit(const TiXmlComment &)
Visit a comment node.
Definition: tinyxml.h:154
TiXmlBase::TIXML_ERROR_STRING_COUNT
@ TIXML_ERROR_STRING_COUNT
Definition: tinyxml.h:290
TiXmlAttribute::QueryDoubleValue
int QueryDoubleValue(double *_value) const
QueryDoubleValue examines the value string. See QueryIntValue().
Definition: tinyxml.cpp:1046
TiXmlHandle::FirstChildElement
TiXmlHandle FirstChildElement() const
Return a handle to the first child element.
Definition: tinyxml.cpp:1459
TiXmlNode::NextSiblingElement
const TiXmlElement * NextSiblingElement() const
Definition: tinyxml.cpp:476
TiXmlNode::TINYXML_TYPECOUNT
@ TINYXML_TYPECOUNT
Definition: tinyxml.h:477
TiXmlParsingData
Definition: tinyxmlparser.cpp:175
TiXmlComment::Accept
virtual bool Accept(TiXmlVisitor *visitor) const
Definition: tinyxml.cpp:1117
TiXmlAttribute::operator<
bool operator<(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:864
TiXmlBase::TIXML_ERROR_READING_ATTRIBUTES
@ TIXML_ERROR_READING_ATTRIBUTES
Definition: tinyxml.h:279
cast.h
TiXmlDeclaration::Accept
virtual bool Accept(TiXmlVisitor *visitor) const
Definition: tinyxml.cpp:1253
TiXmlNode::NoChildren
bool NoChildren() const
Returns true if this node has no children.
Definition: tinyxml.h:702
TiXmlBase::EncodeString
static void EncodeString(const TIXML_STRING &str, TIXML_STRING *out)
Definition: tinyxml.cpp:52
TiXmlText::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
Definition: tinyxmlparser.cpp:1470
TiXmlBase::SkipWhiteSpace
static const char * SkipWhiteSpace(const char *, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:318
TiXmlNode::FirstChild
TiXmlNode * FirstChild()
Definition: tinyxml.h:530
TiXmlAttribute::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:1396
TiXmlDeclaration::operator=
TiXmlDeclaration & operator=(const TiXmlDeclaration &copy)
Definition: tinyxml.cpp:1213
TiXmlNode::InsertAfterChild
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
Definition: tinyxml.cpp:263
TiXmlText::Accept
virtual bool Accept(TiXmlVisitor *content) const
Definition: tinyxml.cpp:1163
TiXmlBase::ConvertUTF32ToUTF8
static void ConvertUTF32ToUTF8(unsigned long input, char *output, int *length)
Definition: tinyxmlparser.cpp:88
TiXmlDeclaration::Version
const char * Version() const
Version. Will return an empty string if none was found.
Definition: tinyxml.h:1226
TiXmlNode::TINYXML_TEXT
@ TINYXML_TEXT
Definition: tinyxml.h:475
TiXmlNode::TINYXML_DECLARATION
@ TINYXML_DECLARATION
Definition: tinyxml.h:476
TiXmlDocument::~TiXmlDocument
virtual ~TiXmlDocument()
Definition: tinyxml.h:1326
TiXmlDeclaration::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
Definition: tinyxmlparser.cpp:1553
TiXmlHandle::FirstChild
TiXmlHandle FirstChild(const std::string &_value) const
Definition: tinyxml.h:1593
TiXmlNode::ValueStr
const std::string & ValueStr() const
Definition: tinyxml.h:501
TiXmlAttributeSet::Find
TiXmlAttribute * Find(const char *_name) const
Definition: tinyxml.cpp:1375
TIXML_ENCODING_UTF8
@ TIXML_ENCODING_UTF8
Definition: tinyxml.h:172
TiXmlVisitor::VisitEnter
virtual bool VisitEnter(const TiXmlElement &, const TiXmlAttribute *)
Visit an element.
Definition: tinyxml.h:145
TiXmlHandle::Text
TiXmlText * Text() const
Definition: tinyxml.h:1624
TiXmlElement::QueryValueAttribute
int QueryValueAttribute(const std::string &name, std::string *outValue) const
Definition: tinyxml.h:983
TiXmlHandle::Node
TiXmlNode * Node() const
Definition: tinyxml.h:1616
TiXmlCursor
Definition: tinyxml.h:105
TiXmlAttribute::operator==
bool operator==(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:863
TiXmlPrinter::Size
size_t Size()
Return the length of the result string.
Definition: tinyxml.h:1694
TiXmlHandle::ToUnknown
TiXmlUnknown * ToUnknown() const
Definition: tinyxml.h:1611
TiXmlComment::Print
virtual void Print(FILE *cfile, int depth) const
Definition: tinyxml.cpp:1100
string.h
TiXmlBase::GetChar
static const char * GetChar(const char *p, char *_value, int *length, TiXmlEncoding encoding)
Definition: tinyxml.h:334
TiXmlDocument::SaveFile
bool SaveFile(const std::string &filename) const
< STL std::string version.
Definition: tinyxml.h:1353
TiXmlComment::CopyTo
void CopyTo(TiXmlComment *target) const
Definition: tinyxml.cpp:1111
TiXmlBase::StreamWhiteSpace
static bool StreamWhiteSpace(std::istream *in, TIXML_STRING *tag)
Definition: tinyxmlparser.cpp:369
TiXmlElement::GetText
const char * GetText() const
Definition: tinyxml.cpp:703
TiXmlBase::ToLower
static int ToLower(int v, TiXmlEncoding encoding)
Definition: tinyxml.h:389
TiXmlNode::TiXmlElement
friend class TiXmlElement
Definition: tinyxml.h:430
TiXmlBase::operator=
void operator=(const TiXmlBase &base)=delete
TiXmlNode::LinkEndChild
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
Definition: tinyxml.cpp:186
TiXmlVisitor::VisitExit
virtual bool VisitExit(const TiXmlElement &)
Visit an element.
Definition: tinyxml.h:147
TiXmlAttribute::QueryIntValue
int QueryIntValue(int *_value) const
Definition: tinyxml.cpp:1039
TiXmlNode::LastChild
const TiXmlNode * LastChild() const
Definition: tinyxml.h:538
TiXmlText::Print
virtual void Print(FILE *cfile, int depth) const
Definition: tinyxml.cpp:1135
TiXmlDocument::ErrorDesc
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
Definition: tinyxml.h:1380
TiXmlDocument::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Definition: tinyxmlparser.cpp:708
TIXML_ENCODING_UNKNOWN
@ TIXML_ENCODING_UNKNOWN
Definition: tinyxml.h:171
TiXmlDeclaration
Definition: tinyxml.h:1202
TiXmlUnknown::CopyTo
void CopyTo(TiXmlUnknown *target) const
Definition: tinyxml.cpp:1279
TiXmlNode::ValueTStr
const TIXML_STRING & ValueTStr() const
Definition: tinyxml.h:504
TiXmlDeclaration::Print
virtual void Print(FILE *cfile, int depth, TIXML_STRING *str) const
Definition: tinyxml.cpp:1221
TiXmlHandle::Child
TiXmlHandle Child(const std::string &_value, int index) const
Definition: tinyxml.h:1596
TiXmlNode::PreviousSibling
TiXmlNode * PreviousSibling()
Definition: tinyxml.h:622
TiXmlBase::IsAlphaNum
static int IsAlphaNum(unsigned char anyByte, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:154
TiXmlBase::StringEqual
static bool StringEqual(const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:538
TiXmlDeclaration::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:1576
TiXmlDocument::Clone
virtual TiXmlNode * Clone() const
Definition: tinyxml.cpp:937
TiXmlHandle::ChildElement
TiXmlHandle ChildElement(const char *value, int index) const
Definition: tinyxml.cpp:1540
TiXmlBase::IsWhiteSpaceCondensed
static bool IsWhiteSpaceCondensed()
Return the current white space setting.
Definition: tinyxml.h:231
TiXmlBase::errorString
static const char * errorString[TIXML_ERROR_STRING_COUNT]
Definition: tinyxml.h:378
TiXmlUnknown::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:1279
TiXmlComment::Clone
virtual TiXmlNode * Clone() const
Returns a copy of this Comment.
Definition: tinyxml.cpp:1123
TiXmlNode::NodeType
NodeType
Definition: tinyxml.h:469
TiXmlHandle::FirstChild
TiXmlHandle FirstChild() const
Return a handle to the first child node.
Definition: tinyxml.cpp:1435
TiXmlBase::Print
virtual void Print(FILE *cfile, int depth) const =0
TiXmlVisitor::Visit
virtual bool Visit(const TiXmlText &)
Visit a text node.
Definition: tinyxml.h:152
TiXmlNode::firstChild
TiXmlNode * firstChild
Definition: tinyxml.h:765
TiXmlAttributeSet::Add
void Add(TiXmlAttribute *attribute)
Definition: tinyxml.cpp:1317
TiXmlPrinter::VisitExit
virtual bool VisitExit(const TiXmlDocument &doc)
Visit a document.
Definition: tinyxml.cpp:1564
TiXmlComment::operator=
TiXmlComment & operator=(const TiXmlComment &base)
Definition: tinyxml.cpp:1092
TiXmlAttributeSet::First
TiXmlAttribute * First()
Definition: tinyxml.h:916
TiXmlNode::operator=
void operator=(const TiXmlNode &base)=delete
TiXmlAttribute::SetIntValue
void SetIntValue(int _value)
Set the value from an integer.
Definition: tinyxml.cpp:1053
TiXmlComment::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
Definition: tinyxmlparser.cpp:1314
TiXmlHandle::ChildElement
TiXmlHandle ChildElement(const std::string &_value, int index) const
Definition: tinyxml.h:1597
TiXmlNode::GetDocument
const TiXmlDocument * GetDocument() const
Definition: tinyxml.cpp:506
TiXmlBase::TIXML_ERROR
@ TIXML_ERROR
Definition: tinyxml.h:274
TiXmlAttribute::SetName
void SetName(const std::string &_name)
STL std::string form.
Definition: tinyxml.h:846
TiXmlText::TiXmlText
TiXmlText(const char *initValue)
Definition: tinyxml.h:1137
TiXmlUnknown
Definition: tinyxml.h:1271
TiXmlUnknown::operator=
TiXmlUnknown & operator=(const TiXmlUnknown &copy)
Definition: tinyxml.h:1278
TiXmlPrinter::LineBreak
const char * LineBreak()
Query the current line breaking string.
Definition: tinyxml.h:1683
TiXmlHandle::Unknown
TiXmlUnknown * Unknown() const
Definition: tinyxml.h:1628
TIXML_PATCH_VERSION
const int TIXML_PATCH_VERSION
Definition: tinyxml.h:100
TiXmlBase::~TiXmlBase
virtual ~TiXmlBase()
Definition: tinyxml.h:209
TiXmlDocument::Print
void Print() const
Definition: tinyxml.h:1436
TiXmlBase::TIXML_ERROR_EMBEDDED_NULL
@ TIXML_ERROR_EMBEDDED_NULL
Definition: tinyxml.h:286
TiXmlNode::InsertBeforeChild
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
Definition: tinyxml.cpp:230
TiXmlDocument::operator=
TiXmlDocument & operator=(const TiXmlDocument &copy)
Definition: tinyxml.cpp:749
TiXmlBase::TIXML_ERROR_READING_ELEMENT_VALUE
@ TIXML_ERROR_READING_ELEMENT_VALUE
Definition: tinyxml.h:278
TiXmlDocument::ClearError
void ClearError()
Definition: tinyxml.h:1428
TiXmlCursor::col
int col
Definition: tinyxml.h:111
TiXmlAttribute::DoubleValue
double DoubleValue() const
Return the value of this attribute, converted to a double.
Definition: tinyxml.cpp:1080
TiXmlPrinter::SetStreamPrinting
void SetStreamPrinting()
Definition: tinyxml.h:1688
TiXmlBase::TIXML_ERROR_PARSING_CDATA
@ TIXML_ERROR_PARSING_CDATA
Definition: tinyxml.h:287
TiXmlNode::value
TIXML_STRING value
Definition: tinyxml.h:768
TiXmlAttribute::SetDoubleValue
void SetDoubleValue(double _value)
Set the value from a double.
Definition: tinyxml.cpp:1064
TiXmlElement::ReadValue
const char * ReadValue(const char *in, TiXmlParsingData *prevData, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:1183
TiXmlText::CopyTo
void CopyTo(TiXmlText *target) const
Definition: tinyxml.cpp:1156
TiXmlComment::~TiXmlComment
virtual ~TiXmlComment()
Definition: tinyxml.h:1091
TiXmlUnknown::Clone
virtual TiXmlNode * Clone() const
Creates a copy of this Unknown and returns it.
Definition: tinyxml.cpp:1291
TiXmlNode::PreviousSibling
TiXmlNode * PreviousSibling(const char *_prev)
Definition: tinyxml.h:626
TiXmlElement::Attribute
std::string Attribute(const std::string &name) const
Definition: tinyxml.cpp:558
TiXmlBase::TIXML_ERROR_DOCUMENT_TOP_ONLY
@ TIXML_ERROR_DOCUMENT_TOP_ONLY
Definition: tinyxml.h:288
TiXmlHandle::FirstChildElement
TiXmlHandle FirstChildElement(const std::string &_value) const
Definition: tinyxml.h:1594
TiXmlElement::FirstAttribute
TiXmlAttribute * FirstAttribute()
Definition: tinyxml.h:1002
TiXmlNode::TINYXML_UNKNOWN
@ TINYXML_UNKNOWN
Definition: tinyxml.h:474
TiXmlAttributeSet::Last
TiXmlAttribute * Last()
Definition: tinyxml.h:918
TiXmlDocument::SetTabSize
void SetTabSize(int _tabsize)
Definition: tinyxml.h:1421
TiXmlDocument::RootElement
TiXmlElement * RootElement()
Definition: tinyxml.h:1370
TiXmlBase::location
TiXmlCursor location
Definition: tinyxml.h:380
TiXmlNode
Definition: tinyxml.h:427
TiXmlVisitor::Visit
virtual bool Visit(const TiXmlUnknown &)
Visit an unknown node.
Definition: tinyxml.h:156
TiXmlNode::IterateChildren
TiXmlNode * IterateChildren(const TiXmlNode *previous)
Definition: tinyxml.h:570
tinystr.h
TiXmlBase::TIXML_NO_ERROR
@ TIXML_NO_ERROR
Definition: tinyxml.h:273
TiXmlDocument::Accept
virtual bool Accept(TiXmlVisitor *content) const
Definition: tinyxml.cpp:959
TiXmlHandle::ToElement
TiXmlElement * ToElement() const
Definition: tinyxml.h:1605
TiXmlElement::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:1047
TiXmlDocument::LoadFile
bool LoadFile(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Definition: tinyxml.cpp:757
TIXML_ENCODING_LEGACY
@ TIXML_ENCODING_LEGACY
Definition: tinyxml.h:173
TiXmlElement::RemoveAttribute
void RemoveAttribute(const std::string &name)
Definition: tinyxml.cpp:436
TiXmlHandle::TiXmlHandle
TiXmlHandle(TiXmlNode *_node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
Definition: tinyxml.h:1559
TiXmlElement::CopyTo
void CopyTo(TiXmlElement *target) const
Definition: tinyxml.cpp:656
TiXmlNode::Parent
const TiXmlNode * Parent() const
Definition: tinyxml.h:527
TiXmlVisitor::Visit
virtual bool Visit(const TiXmlDeclaration &)
Visit a declaration.
Definition: tinyxml.h:150
TiXmlAttribute::IntValue
int IntValue() const
Return the value of this attribute, converted to an integer.
Definition: tinyxml.cpp:1075
TiXmlNode::lastChild
TiXmlNode * lastChild
Definition: tinyxml.h:766
TiXmlNode::Clear
void Clear()
Delete all the children of this node. Does not affect 'this'.
Definition: tinyxml.cpp:169
TiXmlAttributeSet::TiXmlAttributeSet
TiXmlAttributeSet()
Definition: tinyxml.cpp:1303
TiXmlBase::TIXML_ERROR_READING_END_TAG
@ TIXML_ERROR_READING_END_TAG
Definition: tinyxml.h:281
TiXmlBase::GetEntity
static const char * GetEntity(const char *in, char *value, int *length, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:442
TiXmlNode::operator>>
friend std::istream & operator>>(std::istream &in, TiXmlNode &base)
Definition: tinyxml.cpp:1399
TiXmlNode::TINYXML_COMMENT
@ TINYXML_COMMENT
Definition: tinyxml.h:473
TiXmlAttribute::TiXmlAttribute
TiXmlAttribute()
Construct an empty attribute.
Definition: tinyxml.h:788
TiXmlDocument::SaveFile
bool SaveFile() const
Save a file using the current document value. Returns true if successful.
Definition: tinyxml.cpp:763
TiXmlDocument
Definition: tinyxml.h:1310
TiXmlBase::Row
int Row() const
Definition: tinyxml.h:251
TiXmlBase::utf8ByteTable
static const int utf8ByteTable[256]
Definition: tinyxml.h:260
TiXmlAttribute::Print
virtual void Print(FILE *cfile, int depth) const
Definition: tinyxml.h:873
TiXmlElement::LastAttribute
TiXmlAttribute * LastAttribute()
Definition: tinyxml.h:1004
TiXmlElement::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
Definition: tinyxmlparser.cpp:907
TiXmlAttributeSet::Last
const TiXmlAttribute * Last() const
Definition: tinyxml.h:917
TiXmlComment::TiXmlComment
TiXmlComment(const char *_value)
Construct a comment from text.
Definition: tinyxml.h:1085
TiXmlNode::FirstChildElement
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
Definition: tinyxml.cpp:446
TiXmlNode::Value
const char * Value() const
Definition: tinyxml.h:494
TiXmlPrinter::Indent
const char * Indent()
Query the indention string.
Definition: tinyxml.h:1676
TiXmlCursor::row
int row
Definition: tinyxml.h:110
TiXmlPrinter::TiXmlPrinter
TiXmlPrinter()
Definition: tinyxml.h:1657
TiXmlNode::IterateChildren
TiXmlNode * IterateChildren(const char *_value, const TiXmlNode *previous)
Definition: tinyxml.h:576
TiXmlNode::Type
int Type() const
Definition: tinyxml.h:691
TiXmlComment
Definition: tinyxml.h:1079
TiXmlBase
Definition: tinyxml.h:198
TiXmlNode::InsertEndChild
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
Definition: tinyxml.cpp:214
TiXmlNode::Accept
virtual bool Accept(TiXmlVisitor *visitor) const =0
TiXmlNode::Parent
TiXmlNode * Parent()
One step up the DOM.
Definition: tinyxml.h:526
TiXmlElement::SetAttribute
void SetAttribute(const std::string &name, const std::string &_value)
Definition: tinyxml.cpp:594
TiXmlBase::ReadText
static const char * ReadText(const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:578
TiXmlNode::ReplaceChild
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
Definition: tinyxml.cpp:296
TiXmlBase::userData
void * userData
Field containing a generic user pointer.
Definition: tinyxml.h:383
TiXmlAttribute::NameTStr
const TIXML_STRING & NameTStr() const
Definition: tinyxml.h:823
TiXmlDocument::LoadFile
bool LoadFile(const std::string &filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Definition: tinyxml.h:1349
TiXmlAttribute::Next
const TiXmlAttribute * Next() const
Get the next sibling attribute in the DOM. Returns null at end.
Definition: tinyxml.cpp:973
TiXmlBase::TiXmlBase
TiXmlBase()
Definition: tinyxml.h:208
TiXmlText::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:1501
TiXmlHandle::Child
TiXmlHandle Child(const char *value, int index) const
Definition: tinyxml.cpp:1502
TiXmlNode::RemoveChild
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
Definition: tinyxml.cpp:335
TiXmlDeclaration::~TiXmlDeclaration
virtual ~TiXmlDeclaration()
Definition: tinyxml.h:1223
TiXmlNode::TINYXML_DOCUMENT
@ TINYXML_DOCUMENT
Definition: tinyxml.h:471
TiXmlHandle::TiXmlHandle
TiXmlHandle(const TiXmlHandle &ref)
Copy constructor.
Definition: tinyxml.h:1561
TiXmlDocument::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
Definition: tinyxmlparser.cpp:645
TiXmlNode::FirstChildElement
TiXmlElement * FirstChildElement(const char *_value)
Definition: tinyxml.h:678
TiXmlPrinter::Visit
virtual bool Visit(const TiXmlDeclaration &declaration)
Visit a declaration.
Definition: tinyxml.cpp:1660
TiXmlNode::NextSiblingElement
TiXmlElement * NextSiblingElement()
Definition: tinyxml.h:652
TiXmlDeclaration::Clone
virtual TiXmlNode * Clone() const
Creates a copy of this Declaration and returns it.
Definition: tinyxml.cpp:1259
TiXmlDeclaration::CopyTo
void CopyTo(TiXmlDeclaration *target) const
Definition: tinyxml.cpp:1243
TiXmlUnknown::Accept
virtual bool Accept(TiXmlVisitor *content) const
Definition: tinyxml.cpp:1285
TiXmlAttributeSet
Definition: tinyxml.h:906
TIXML_NO_ATTRIBUTE
@ TIXML_NO_ATTRIBUTE
Definition: tinyxml.h:163
TiXmlNode::FirstChildElement
TiXmlElement * FirstChildElement()
Definition: tinyxml.h:672
TIXML_MAJOR_VERSION
const int TIXML_MAJOR_VERSION
Definition: tinyxml.h:98
TiXmlText::operator=
TiXmlText & operator=(const TiXmlText &base)
Definition: tinyxml.h:1154
TiXmlUnknown::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
Definition: tinyxmlparser.cpp:1255
TiXmlUnknown::TiXmlUnknown
TiXmlUnknown()
Definition: tinyxml.h:1274
TiXmlBase::StreamTo
static bool StreamTo(std::istream *in, int character, TIXML_STRING *tag)
Definition: tinyxmlparser.cpp:384
TiXmlText
Definition: tinyxml.h:1129
TiXmlElement::readType
T readType(const std::string &str) const
Definition: tinyxml.h:953
TiXmlElement::Accept
virtual bool Accept(TiXmlVisitor *visitor) const
Definition: tinyxml.cpp:678
TiXmlNode::next
TiXmlNode * next
Definition: tinyxml.h:771
TiXmlNode::CopyTo
void CopyTo(TiXmlNode *target) const
Definition: tinyxml.cpp:161
stdext::to_string
std::string to_string(const T &t)
Definition: string.h:35
TiXmlNode::Clone
virtual TiXmlNode * Clone() const =0
TiXmlText::CDATA
bool CDATA() const
Queries whether this represents text using a CDATA section.
Definition: tinyxml.h:1160
TiXmlNode::TINYXML_ELEMENT
@ TINYXML_ELEMENT
Definition: tinyxml.h:472
TiXmlEncoding
TiXmlEncoding
Definition: tinyxml.h:169
TiXmlPrinter::Str
const std::string & Str()
Return the result.
Definition: tinyxml.h:1698
TiXmlComment::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:1341
TiXmlText::TiXmlText
TiXmlText(const TiXmlText &copy)
Definition: tinyxml.h:1153
TiXmlElement::operator=
TiXmlElement & operator=(const TiXmlElement &base)
Definition: tinyxml.cpp:533
TiXmlDocument::ErrorId
int ErrorId() const
Definition: tinyxml.h:1385
TiXmlBase::TIXML_ERROR_PARSING_EMPTY
@ TIXML_ERROR_PARSING_EMPTY
Definition: tinyxml.h:280
TiXmlBase::IsWhiteSpace
static bool IsWhiteSpace(char c)
Definition: tinyxml.h:297
TiXmlPrinter::SetIndent
void SetIndent(const char *_indent)
Definition: tinyxml.h:1674
TiXmlAttribute::SetDocument
void SetDocument(TiXmlDocument *doc)
Definition: tinyxml.h:880
TiXmlBase::Parse
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)=0
TiXmlHandle::operator=
TiXmlHandle operator=(const TiXmlHandle &ref)
Definition: tinyxml.h:1562
TiXmlElement::QueryValueAttribute
int QueryValueAttribute(const std::string &name, T *outValue) const
Definition: tinyxml.h:970
TiXmlNode::PreviousSibling
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:621
TiXmlAttribute
Definition: tinyxml.h:782
TiXmlBase::TIXML_ERROR_DOCUMENT_EMPTY
@ TIXML_ERROR_DOCUMENT_EMPTY
Definition: tinyxml.h:285
TiXmlUnknown::TiXmlUnknown
TiXmlUnknown(const TiXmlUnknown &copy)
Definition: tinyxml.h:1277
TiXmlBase::TIXML_ERROR_PARSING_ELEMENT
@ TIXML_ERROR_PARSING_ELEMENT
Definition: tinyxml.h:276
TiXmlPrinter::SetLineBreak
void SetLineBreak(const char *_lineBreak)
Definition: tinyxml.h:1681
TIXML_WRONG_TYPE
@ TIXML_WRONG_TYPE
Definition: tinyxml.h:164
TiXmlVisitor::VisitEnter
virtual bool VisitEnter(const TiXmlDocument &)
Visit a document.
Definition: tinyxml.h:140
TiXmlNode::LastChild
TiXmlNode * LastChild()
The last child of this node. Will be null if there are no children.
Definition: tinyxml.h:539
TiXmlAttribute::operator>
bool operator>(const TiXmlAttribute &rhs) const
Definition: tinyxml.h:865
TiXmlAttributeSet::~TiXmlAttributeSet
~TiXmlAttributeSet()
Definition: tinyxml.cpp:1310
TiXmlBase::TIXML_ERROR_PARSING_COMMENT
@ TIXML_ERROR_PARSING_COMMENT
Definition: tinyxml.h:283
TiXmlBase::IsAlpha
static int IsAlpha(unsigned char anyByte, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:133
TiXmlVisitor
Definition: tinyxml.h:134
TiXmlBase::IsWhiteSpace
static bool IsWhiteSpace(int c)
Definition: tinyxml.h:301
TiXmlBase::TIXML_ERROR_PARSING_DECLARATION
@ TIXML_ERROR_PARSING_DECLARATION
Definition: tinyxml.h:284
TiXmlDocument::RootElement
const TiXmlElement * RootElement() const
Definition: tinyxml.h:1369
TiXmlElement::ClearThis
void ClearThis()
Definition: tinyxml.cpp:547
TiXmlBase::SetCondenseWhiteSpace
static void SetCondenseWhiteSpace(bool condense)
Definition: tinyxml.h:228
TiXmlNode::NextSibling
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
Definition: tinyxml.h:638
TiXmlVisitor::VisitExit
virtual bool VisitExit(const TiXmlDocument &)
Visit a document.
Definition: tinyxml.h:142
TiXmlPrinter
Definition: tinyxml.h:1654
TiXmlElement::Print
virtual void Print(FILE *cfile, int depth) const
Definition: tinyxml.cpp:603
TiXmlAttribute::Previous
TiXmlAttribute * Previous()
Definition: tinyxml.h:859
TiXmlNode::NextSibling
TiXmlNode * NextSibling(const char *_next)
Definition: tinyxml.h:643
TiXmlDeclaration::Print
virtual void Print(FILE *cfile, int depth) const
Definition: tinyxml.h:1236
TiXmlPrinter::CStr
const char * CStr()
Return the result.
Definition: tinyxml.h:1692
TiXmlElement
Definition: tinyxml.h:943
TiXmlDocument::ErrorRow
int ErrorRow() const
Definition: tinyxml.h:1394
TiXmlElement::Clone
virtual TiXmlNode * Clone() const
Creates a new Element and returns it - the returned element is a copy.
Definition: tinyxml.cpp:692
TiXmlHandle
Definition: tinyxml.h:1555
TiXmlDocument::SetError
void SetError(int err, const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:802
TiXmlDocument::Error
bool Error() const
Definition: tinyxml.h:1377
TiXmlElement::~TiXmlElement
virtual ~TiXmlElement()
Definition: tinyxml.cpp:541
TiXmlNode::NextSiblingElement
TiXmlElement * NextSiblingElement(const char *_next)
Definition: tinyxml.h:661
TiXmlNode::Identify
TiXmlNode * Identify(const char *start, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:822
TiXmlNode::GetDocument
TiXmlDocument * GetDocument()
Definition: tinyxml.h:697
TiXmlNode::SetValue
void SetValue(const char *_value)
Definition: tinyxml.h:515
TiXmlText::SetCDATA
void SetCDATA(bool _cdata)
Turns on or off a CDATA representation of text.
Definition: tinyxml.h:1162
TiXmlAttribute::SetValue
void SetValue(const std::string &_value)
STL std::string form.
Definition: tinyxml.h:848
TiXmlCursor::Clear
void Clear()
Definition: tinyxml.h:108
TiXmlAttributeSet::First
const TiXmlAttribute * First() const
Definition: tinyxml.h:915
TiXmlText::Clone
virtual TiXmlNode * Clone() const
[internal use] Creates a new Element and returns it.
Definition: tinyxml.cpp:1169
TiXmlElement::SetAttribute
void SetAttribute(const std::string &name, int _value)
Definition: tinyxml.h:997
TiXmlCursor::TiXmlCursor
TiXmlCursor()
Definition: tinyxml.h:107
TiXmlHandle::ToText
TiXmlText * ToText() const
Definition: tinyxml.h:1608
TiXmlNode::NextSibling
TiXmlNode * NextSibling()
Definition: tinyxml.h:639
TiXmlNode::prev
TiXmlNode * prev
Definition: tinyxml.h:770
stdext::tolower
void tolower(std::string &str)
Definition: string.cpp:216
TiXmlUnknown::Print
virtual void Print(FILE *cfile, int depth) const
Definition: tinyxml.cpp:1271
TIXML_SUCCESS
@ TIXML_SUCCESS
Definition: tinyxml.h:162
TiXmlHandle::Element
TiXmlElement * Element() const
Definition: tinyxml.h:1620
TiXmlPrinter::VisitEnter
virtual bool VisitEnter(const TiXmlDocument &doc)
Visit a document.
Definition: tinyxml.cpp:1559
TiXmlDocument::TiXmlDocument
TiXmlDocument()
Create an empty document, that has no name.
Definition: tinyxml.cpp:716
TiXmlBase::TIXML_ERROR_OPENING_FILE
@ TIXML_ERROR_OPENING_FILE
Definition: tinyxml.h:275
TiXmlNode::~TiXmlNode
virtual ~TiXmlNode()
Definition: tinyxml.cpp:147
TIXML_MINOR_VERSION
const int TIXML_MINOR_VERSION
Definition: tinyxml.h:99
TIXML_STRING
#define TIXML_STRING
Definition: tinyxml.h:56
TiXmlNode::LastChild
TiXmlNode * LastChild(const char *_value)
The last child of this node matching 'value'. Will be null if there are no children.
Definition: tinyxml.h:542
TiXmlDeclaration::Encoding
const char * Encoding() const
Encoding. Will return an empty string if none was found.
Definition: tinyxml.h:1228
TiXmlNode::type
NodeType type
Definition: tinyxml.h:763
TiXmlBase::ReadName
static const char * ReadName(const char *p, TIXML_STRING *name, TiXmlEncoding encoding)
Definition: tinyxmlparser.cpp:405
TiXmlAttributeSet::Remove
void Remove(TiXmlAttribute *attribute)
Definition: tinyxml.cpp:1332
TiXmlDeclaration::Standalone
const char * Standalone() const
Is this a standalone document?
Definition: tinyxml.h:1230
TiXmlAttribute::Previous
const TiXmlAttribute * Previous() const
Get the previous sibling attribute in the DOM. Returns null at beginning.
Definition: tinyxml.cpp:993
TiXmlNode::parent
TiXmlNode * parent
Definition: tinyxml.h:762
TiXmlText::~TiXmlText
virtual ~TiXmlText()
Definition: tinyxml.h:1142
TiXmlAttribute::Next
TiXmlAttribute * Next()
Definition: tinyxml.h:853
TiXmlNode::IterateChildren
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
Definition: tinyxml.cpp:385
TiXmlVisitor::~TiXmlVisitor
virtual ~TiXmlVisitor()
Definition: tinyxml.h:137
TiXmlDocument::TabSize
int TabSize() const
Definition: tinyxml.h:1423
TiXmlBase::TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME
@ TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME
Definition: tinyxml.h:277
TiXmlNode::StreamIn
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)=0