33 #ifndef TINYXML2_INCLUDED 34 #define TINYXML2_INCLUDED 36 #if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__) 65 #if defined( _DEBUG ) || defined( DEBUG ) || defined (__DEBUG__) 72 # pragma warning(push) 73 # pragma warning(disable: 4251) 77 # ifdef TINYXML2_EXPORT 78 # define TINYXML2_LIB __declspec(dllexport) 79 # elif defined(TINYXML2_IMPORT) 80 # define TINYXML2_LIB __declspec(dllimport) 85 # define TINYXML2_LIB __attribute__((visibility("default"))) 92 # if defined(_MSC_VER) 93 # // "(void)0," is for suppressing C4127 warning in "assert(false)", "assert(true)" and the like 94 # define TIXMLASSERT( x ) if ( !((void)0,(x))) { __debugbreak(); } 95 # elif defined (ANDROID_NDK) 96 # include <android/log.h> 97 # define TIXMLASSERT( x ) if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } 100 # define TIXMLASSERT assert 103 # define TIXMLASSERT( x ) {} 110 static const int TIXML2_MAJOR_VERSION = 4;
111 static const int TIXML2_MINOR_VERSION = 0;
112 static const int TIXML2_PATCH_VERSION = 1;
121 class XMLDeclaration;
147 StrPair() : _flags( 0 ), _start( 0 ), _end( 0 ) {}
150 void Set(
char* start,
char* end,
int flags ) {
156 _flags = flags | NEEDS_FLUSH;
162 return _start == _end;
167 _start =
const_cast<char*
>(str);
170 void SetStr(
const char* str,
int flags=0 );
172 char*
ParseText(
char* in,
const char* endTag,
int strFlags );
179 void CollapseWhitespace();
191 void operator=(
StrPair& other );
200 template <
class T,
int INITIAL_SIZE>
206 _allocated = INITIAL_SIZE;
211 if ( _mem != _pool ) {
222 EnsureCapacity( _size+1 );
230 EnsureCapacity( _size+count );
231 T* ret = &_mem[_size];
263 return _mem[ _size - 1];
290 void EnsureCapacity(
int cap ) {
292 if ( cap > _allocated ) {
294 int newAllocated = cap * 2;
295 T* newMem =
new T[newAllocated];
296 memcpy( newMem, _mem,
sizeof(T)*_size );
297 if ( _mem != _pool ) {
301 _allocated = newAllocated;
306 T _pool[INITIAL_SIZE];
322 virtual int ItemSize()
const = 0;
323 virtual void* Alloc() = 0;
324 virtual void Free(
void* ) = 0;
325 virtual void SetTracked() = 0;
326 virtual void Clear() = 0;
333 template<
int ITEM_SIZE >
337 MemPoolT() : _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {}
344 while( !_blockPtrs.Empty()) {
345 Block* b = _blockPtrs.Pop();
359 return _currentAllocs;
365 Block* block =
new Block();
366 _blockPtrs.Push( block );
368 Item* blockItems = block->items;
369 for(
int i = 0;
i < ITEMS_PER_BLOCK - 1; ++
i ) {
370 blockItems[
i].next = &(blockItems[
i + 1]);
372 blockItems[ITEMS_PER_BLOCK - 1].next = 0;
375 Item*
const result = _root;
380 if ( _currentAllocs > _maxAllocs ) {
381 _maxAllocs = _currentAllocs;
388 virtual void Free(
void* mem ) {
393 Item* item =
static_cast<Item*
>( mem );
395 memset( item, 0xfe,
sizeof( *item ) );
401 printf(
"Mempool %s watermark=%d [%dk] current=%d size=%d nAlloc=%d blocks=%d\n",
402 name, _maxAllocs, _maxAllocs * ITEM_SIZE / 1024, _currentAllocs,
403 ITEM_SIZE, _nAllocs, _blockPtrs.Size() );
425 enum { ITEMS_PER_BLOCK = (4 * 1024) / ITEM_SIZE };
433 char itemData[ITEM_SIZE];
436 Item items[ITEMS_PER_BLOCK];
544 while( IsWhiteSpace(*p) ) {
551 return const_cast<char*
>( SkipWhiteSpace( const_cast<const char*>(p) ) );
557 return !IsUTF8Continuation(p) && isspace( static_cast<unsigned char>(p) );
565 if ( isalpha( ch ) ) {
568 return ch ==
':' || ch ==
'_';
572 return IsNameStartChar( ch )
578 inline static bool StringEqual(
const char* p,
const char* q,
int nChar=INT_MAX ) {
585 return strncmp( p, q, nChar ) == 0;
589 return ( p & 0x80 ) != 0;
592 static const char* ReadBOM(
const char* p,
bool* hasBOM );
595 static const char* GetCharacterRef(
const char* p,
char* value,
int* length );
596 static void ConvertUTF32ToUTF8(
unsigned long input,
char* output,
int* length );
599 static void ToStr(
int v,
char* buffer,
int bufferSize );
600 static void ToStr(
unsigned v,
char* buffer,
int bufferSize );
601 static void ToStr(
bool v,
char* buffer,
int bufferSize );
602 static void ToStr(
float v,
char* buffer,
int bufferSize );
603 static void ToStr(
double v,
char* buffer,
int bufferSize );
604 static void ToStr(int64_t v,
char* buffer,
int bufferSize);
607 static bool ToInt(
const char* str,
int* value );
608 static bool ToUnsigned(
const char* str,
unsigned* value );
609 static bool ToBool(
const char* str,
bool* value );
610 static bool ToFloat(
const char* str,
float* value );
611 static bool ToDouble(
const char* str,
double* value );
612 static bool ToInt64(
const char* str, int64_t* value);
711 const char* Value()
const;
716 void SetValue(
const char* val,
bool staticMem=
false );
744 const XMLElement* FirstChildElement(
const char* name = 0 )
const;
747 return const_cast<XMLElement*
>(
const_cast<const XMLNode*
>(
this)->FirstChildElement( name ));
762 const XMLElement* LastChildElement(
const char* name = 0 )
const;
765 return const_cast<XMLElement*
>(
const_cast<const XMLNode*
>(
this)->LastChildElement(name) );
778 const XMLElement* PreviousSiblingElement(
const char* name = 0 )
const ;
781 return const_cast<XMLElement*
>(
const_cast<const XMLNode*
>(
this)->PreviousSiblingElement( name ) );
794 const XMLElement* NextSiblingElement(
const char* name = 0 )
const;
797 return const_cast<XMLElement*
>(
const_cast<const XMLNode*
>(
this)->NextSiblingElement( name ) );
810 return InsertEndChild( addThis );
833 void DeleteChildren();
838 void DeleteChild(
XMLNode* node );
857 virtual bool ShallowEqual(
const XMLNode* compare )
const = 0;
881 virtual bool Accept(
XMLVisitor* visitor )
const = 0;
901 virtual char* ParseDeep(
char*,
StrPair* );
918 static void DeleteNode(
XMLNode* node );
919 void InsertChildPreamble(
XMLNode* insertThis )
const;
920 const XMLElement* ToElementWithName(
const char* name )
const;
943 virtual bool Accept(
XMLVisitor* visitor )
const;
962 virtual bool ShallowEqual(
const XMLNode* compare )
const;
968 char* ParseDeep(
char*,
StrPair* endTag );
990 virtual bool Accept(
XMLVisitor* visitor )
const;
993 virtual bool ShallowEqual(
const XMLNode* compare )
const;
999 char* ParseDeep(
char*,
StrPair* endTag );
1029 virtual bool Accept(
XMLVisitor* visitor )
const;
1032 virtual bool ShallowEqual(
const XMLNode* compare )
const;
1038 char* ParseDeep(
char*,
StrPair* endTag );
1064 virtual bool Accept(
XMLVisitor* visitor )
const;
1067 virtual bool ShallowEqual(
const XMLNode* compare )
const;
1073 char* ParseDeep(
char*,
StrPair* endTag );
1093 const char* Name()
const;
1096 const char* Value()
const;
1115 QueryInt64Value(&i);
1122 QueryUnsignedValue( &i );
1128 QueryBoolValue( &b );
1134 QueryDoubleValue( &d );
1140 QueryFloatValue( &f );
1148 XMLError QueryIntValue(
int* value )
const;
1150 XMLError QueryUnsignedValue(
unsigned int* value )
const;
1152 XMLError QueryInt64Value(int64_t* value)
const;
1154 XMLError QueryBoolValue(
bool* value )
const;
1156 XMLError QueryDoubleValue(
double* value )
const;
1158 XMLError QueryFloatValue(
float* value )
const;
1161 void SetAttribute(
const char* value );
1163 void SetAttribute(
int value );
1165 void SetAttribute(
unsigned value );
1167 void SetAttribute(int64_t value);
1169 void SetAttribute(
bool value );
1171 void SetAttribute(
double value );
1173 void SetAttribute(
float value );
1176 enum { BUF_SIZE = 200 };
1183 void SetName(
const char* name );
1185 char* ParseDeep(
char* p,
bool processEntities );
1207 void SetName(
const char* str,
bool staticMem=
false ) {
1208 SetValue( str, staticMem );
1217 virtual bool Accept(
XMLVisitor* visitor )
const;
1242 const char* Attribute(
const char* name,
const char* value=0 )
const;
1250 int IntAttribute(
const char* name,
int defaultValue = 0)
const;
1252 unsigned UnsignedAttribute(
const char* name,
unsigned defaultValue = 0)
const;
1254 int64_t Int64Attribute(
const char* name, int64_t defaultValue = 0)
const;
1256 bool BoolAttribute(
const char* name,
bool defaultValue =
false)
const;
1258 double DoubleAttribute(
const char* name,
double defaultValue = 0)
const;
1260 float FloatAttribute(
const char* name,
float defaultValue = 0)
const;
1345 return QueryIntAttribute( name, value );
1349 return QueryUnsignedAttribute( name, value );
1353 return QueryInt64Attribute(name, value);
1357 return QueryBoolAttribute( name, value );
1361 return QueryDoubleAttribute( name, value );
1365 return QueryFloatAttribute( name, value );
1409 void DeleteAttribute(
const char* name );
1413 return _rootAttribute;
1416 const XMLAttribute* FindAttribute(
const char* name )
const;
1446 const char* GetText()
const;
1482 void SetText(
const char* inText );
1484 void SetText(
int value );
1486 void SetText(
unsigned value );
1488 void SetText(int64_t value);
1490 void SetText(
bool value );
1492 void SetText(
double value );
1494 void SetText(
float value );
1522 XMLError QueryIntText(
int* ival )
const;
1524 XMLError QueryUnsignedText(
unsigned* uval )
const;
1526 XMLError QueryInt64Text(int64_t* uval)
const;
1528 XMLError QueryBoolText(
bool* bval )
const;
1530 XMLError QueryDoubleText(
double* dval )
const;
1532 XMLError QueryFloatText(
float* fval )
const;
1534 int IntText(
int defaultValue = 0)
const;
1537 unsigned UnsignedText(
unsigned defaultValue = 0)
const;
1539 int64_t Int64Text(int64_t defaultValue = 0)
const;
1541 bool BoolText(
bool defaultValue =
false)
const;
1543 double DoubleText(
double defaultValue = 0)
const;
1545 float FloatText(
float defaultValue = 0)
const;
1554 return _closingType;
1557 virtual bool ShallowEqual(
const XMLNode* compare )
const;
1560 char* ParseDeep(
char* p,
StrPair* endTag );
1571 XMLAttribute* FindOrCreateAttribute(
const char* name );
1573 char* ParseAttributes(
char* p );
1574 static void DeleteAttribute(
XMLAttribute* attribute );
1576 enum { BUF_SIZE = 200 };
1623 XMLError Parse(
const char* xml,
size_t nBytes=(
size_t)(-1) );
1650 XMLError SaveFile(
const char* filename,
bool compact =
false );
1659 XMLError SaveFile( FILE* fp,
bool compact =
false );
1662 return _processEntities;
1684 return FirstChildElement();
1687 return FirstChildElement();
1705 virtual bool Accept(
XMLVisitor* visitor )
const;
1718 XMLComment* NewComment(
const char* comment );
1724 XMLText* NewText(
const char* text );
1748 void DeleteNode(
XMLNode* node );
1750 void SetError(
XMLError error,
const char* str1,
const char* str2 );
1760 const char* ErrorName()
const;
1764 return _errorStr1.GetStr();
1768 return _errorStr2.GetStr();
1771 void PrintError()
const;
1777 char* Identify(
char* p,
XMLNode** node );
1791 bool _processEntities;
1887 return XMLHandle( _node ? _node->FirstChild() : 0 );
1891 return XMLHandle( _node ? _node->FirstChildElement( name ) : 0 );
1895 return XMLHandle( _node ? _node->LastChild() : 0 );
1899 return XMLHandle( _node ? _node->LastChildElement( name ) : 0 );
1903 return XMLHandle( _node ? _node->PreviousSibling() : 0 );
1907 return XMLHandle( _node ? _node->PreviousSiblingElement( name ) : 0 );
1911 return XMLHandle( _node ? _node->NextSibling() : 0 );
1915 return XMLHandle( _node ? _node->NextSiblingElement( name ) : 0 );
1924 return ( ( _node == 0 ) ? 0 : _node->ToElement() );
1928 return ( ( _node == 0 ) ? 0 : _node->ToText() );
1932 return ( ( _node == 0 ) ? 0 : _node->ToUnknown() );
1936 return ( ( _node == 0 ) ? 0 : _node->ToDeclaration() );
1970 return XMLConstHandle( _node ? _node->FirstChildElement( name ) : 0 );
1976 return XMLConstHandle( _node ? _node->LastChildElement( name ) : 0 );
1982 return XMLConstHandle( _node ? _node->PreviousSiblingElement( name ) : 0 );
1988 return XMLConstHandle( _node ? _node->NextSiblingElement( name ) : 0 );
1996 return ( ( _node == 0 ) ? 0 : _node->ToElement() );
1999 return ( ( _node == 0 ) ? 0 : _node->ToText() );
2002 return ( ( _node == 0 ) ? 0 : _node->ToUnknown() );
2005 return ( ( _node == 0 ) ? 0 : _node->ToDeclaration() );
2064 XMLPrinter( FILE* file=0,
bool compact =
false,
int depth = 0 );
2068 void PushHeader(
bool writeBOM,
bool writeDeclaration );
2072 void OpenElement(
const char* name,
bool compactMode=
false );
2074 void PushAttribute(
const char* name,
const char* value );
2075 void PushAttribute(
const char* name,
int value );
2076 void PushAttribute(
const char* name,
unsigned value );
2077 void PushAttribute(
const char* name, int64_t value);
2078 void PushAttribute(
const char* name,
bool value );
2079 void PushAttribute(
const char* name,
double value );
2081 virtual void CloseElement(
bool compactMode=
false );
2084 void PushText(
const char* text,
bool cdata=
false );
2086 void PushText(
int value );
2088 void PushText(
unsigned value );
2090 void PushText(int64_t value);
2092 void PushText(
bool value );
2094 void PushText(
float value );
2096 void PushText(
double value );
2099 void PushComment(
const char* comment );
2101 void PushDeclaration(
const char* value );
2102 void PushUnknown(
const char* value );
2110 virtual bool VisitExit(
const XMLElement& element );
2112 virtual bool Visit(
const XMLText& text );
2113 virtual bool Visit(
const XMLComment& comment );
2115 virtual bool Visit(
const XMLUnknown& unknown );
2122 return _buffer.Mem();
2130 return _buffer.Size();
2147 virtual void PrintSpace(
int depth );
2148 void Print(
const char* format, ... );
2150 void SealElementIfJustOpened();
2155 void PrintString(
const char*,
bool restrictedEntitySet );
2161 bool _processEntities;
2168 bool _entityFlag[ENTITY_RANGE];
2169 bool _restrictedEntityFlag[ENTITY_RANGE];
2177 #if defined(_MSC_VER) 2178 # pragma warning(pop) 2181 #endif // TINYXML2_INCLUDED virtual XMLElement * ToElement()
Safely cast to an Element, or null.
int QueryAttribute(const char *name, int *value) const
int QueryAttribute(const char *name, bool *value) const
const XMLDeclaration * ToDeclaration() const
bool BoolValue() const
Query as a boolean. See IntValue()
void SetAttribute(const char *name, int64_t value)
Sets the named attribute to value.
bool Error() const
Return true if there was an error parsing the document.
const XMLConstHandle FirstChild() const
const XMLConstHandle LastChild() const
XMLError QueryIntValue(int *value) const
const XMLText * ToText() const
XMLError QueryUnsignedAttribute(const char *name, unsigned int *value) const
See QueryIntAttribute()
virtual const XMLDeclaration * ToDeclaration() const
virtual XMLDocument * ToDocument()
Safely cast to a Document, or null.
XMLHandle(XMLNode *node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
virtual const XMLComment * ToComment() const
XMLElement * PreviousSiblingElement(const char *name=0)
int CurrentAllocs() const
XMLError QueryFloatValue(float *value) const
See QueryIntValue.
const T & operator[](int i) const
XMLElement * LastChildElement(const char *name=0)
static const char * SkipWhiteSpace(const char *p)
void SetAttribute(const char *name, unsigned value)
Sets the named attribute to value.
virtual XMLComment * ToComment()
Safely cast to a Comment, or null.
XMLConstHandle & operator=(const XMLConstHandle &ref)
virtual const XMLText * ToText() const
XMLError QueryInt64Value(int64_t *value) const
See QueryIntValue.
virtual bool VisitEnter(const XMLElement &, const XMLAttribute *)
Visit an element.
bool CData() const
Returns true if this is a CDATA text element.
void Set(char *start, char *end, int flags)
static bool IsNameChar(unsigned char ch)
static bool IsWhiteSpace(char p)
void TransferTo(StrPair *other)
const XMLElement * RootElement() const
virtual XMLUnknown * ToUnknown()
Safely cast to an Unknown, or null.
virtual bool Visit(const XMLText &)
Visit a text node.
const XMLNode * FirstChild() const
Get the first child node, or null if none exists.
virtual bool ShallowEqual(const XMLNode *) const
static char * SkipWhiteSpace(char *p)
double DoubleValue() const
Query as a double. See IntValue()
XMLConstHandle(const XMLNode *node)
XMLNode * PreviousSibling()
virtual bool VisitExit(const XMLDocument &)
Visit a document.
char * ParseName(char *in)
const T & PeekTop() const
XMLConstHandle(const XMLNode &node)
int QueryAttribute(const char *name, double *value) const
void SetAttribute(const char *value)
Set the attribute to a string value.
virtual const XMLText * ToText() const
XMLError QueryFloatAttribute(const char *name, float *value) const
See QueryIntAttribute()
virtual const XMLUnknown * ToUnknown() const
const XMLNode * ToNode() const
const XMLConstHandle PreviousSibling() const
virtual XMLText * ToText()
Safely cast to Text, or null.
virtual bool Visit(const XMLComment &)
Visit a comment node.
XMLHandle LastChild()
Get the last child of this handle.
virtual XMLNode * ShallowClone(XMLDocument *) const
void SetAttribute(const char *name, const char *value)
Sets the named attribute to value.
const char * GetErrorStr2() const
Return a possibly helpful secondary diagnostic location or string.
XMLHandle FirstChildElement(const char *name=0)
Get the first child element of this handle.
const XMLUnknown * ToUnknown() const
XMLHandle & operator=(const XMLHandle &ref)
Assignment.
const XMLConstHandle NextSibling() const
XMLError QueryDoubleValue(double *value) const
See QueryIntValue.
XMLError QueryInt64Attribute(const char *name, int64_t *value) const
See QueryIntAttribute()
bool ProcessEntities() const
XMLError ErrorID() const
Return the errorID.
XMLElement * RootElement()
XMLHandle NextSiblingElement(const char *name=0)
Get the next sibling element of this handle.
static bool IsUTF8Continuation(char p)
const XMLNode * Parent() const
Get the parent of this node on the DOM.
const XMLAttribute * Next() const
The next attribute in the list.
XMLError QueryDoubleAttribute(const char *name, double *value) const
See QueryIntAttribute()
void SetName(const char *str, bool staticMem=false)
Set the name of the element.
void SetAttribute(const char *name, double value)
Sets the named attribute to value.
int QueryAttribute(const char *name, float *value) const
const XMLConstHandle PreviousSiblingElement(const char *name=0) const
void * GetUserData() const
XMLHandle LastChildElement(const char *name=0)
Get the last child element of this handle.
virtual bool VisitExit(const XMLDocument &)
Visit a document.
void SetStr(const char *str, int flags=0)
XMLHandle(XMLNode &node)
Create a handle from a node.
void SetCData(bool isCData)
Declare whether this should be CDATA or standard text.
XMLDocument * GetDocument()
Get the XMLDocument that owns this XMLNode.
const XMLDocument * GetDocument() const
Get the XMLDocument that owns this XMLNode.
virtual XMLDeclaration * ToDeclaration()
Safely cast to a Declaration, or null.
virtual XMLUnknown * ToUnknown()
Safely cast to an Unknown, or null.
static bool StringEqual(const char *p, const char *q, int nChar=INT_MAX)
int64_t Int64Value() const
virtual bool VisitExit(const XMLElement &)
Visit an element.
int QueryAttribute(const char *name, int64_t *value) const
virtual const XMLElement * ToElement() const
virtual bool Visit(const XMLUnknown &)
Visit an unknown node.
XMLConstHandle(const XMLConstHandle &ref)
XMLElement * NextSiblingElement(const char *name=0)
const XMLNode * PreviousSibling() const
Get the previous (left) sibling node of this node.
virtual const XMLDeclaration * ToDeclaration() const
XMLNode * LinkEndChild(XMLNode *addThis)
XMLElement * FirstChildElement(const char *name=0)
void SetAttribute(const char *name, bool value)
Sets the named attribute to value.
void SetAttribute(const char *name, float value)
Sets the named attribute to value.
const char * GetErrorStr1() const
Return a possibly helpful diagnostic location or string.
const XMLConstHandle FirstChildElement(const char *name=0) const
DynArray< const char *, 10 > _stack
XMLError QueryIntAttribute(const char *name, int *value) const
XMLNode * ToNode()
Safe cast to XMLNode. This can return null.
void SetUserData(void *userData)
XMLHandle NextSibling()
Get the next sibling of this handle.
unsigned UnsignedValue() const
Query as an unsigned integer. See IntValue()
XMLError QueryUnsignedValue(unsigned int *value) const
See QueryIntValue.
XMLText(XMLDocument *doc)
static bool IsNameStartChar(unsigned char ch)
const XMLElement * ToElement() const
virtual XMLText * ToText()
Safely cast to Text, or null.
void SetAttribute(const char *name, int value)
Sets the named attribute to value.
XMLError QueryBoolAttribute(const char *name, bool *value) const
See QueryIntAttribute()
virtual void Free(void *mem)
XMLText * ToText()
Safe cast to XMLText. This can return null.
int QueryAttribute(const char *name, unsigned int *value) const
const XMLNode * LastChild() const
Get the last child node, or null if none exists.
const XMLConstHandle LastChildElement(const char *name=0) const
const XMLConstHandle NextSiblingElement(const char *name=0) const
virtual bool CompactMode(const XMLElement &)
XMLHandle PreviousSibling()
Get the previous sibling of this handle.
XMLDeclaration * ToDeclaration()
Safe cast to XMLDeclaration. This can return null.
bool NoChildren() const
Returns true if this node has no children.
virtual const XMLDocument * ToDocument() const
const XMLAttribute * FirstAttribute() const
Return the first attribute in the list.
virtual int ItemSize() const
XMLUnknown * ToUnknown()
Safe cast to XMLUnknown. This can return null.
XMLHandle FirstChild()
Get the first child of this handle.
virtual const XMLUnknown * ToUnknown() const
XMLElement * ToElement()
Safe cast to XMLElement. This can return null.
XMLHandle PreviousSiblingElement(const char *name=0)
Get the previous sibling element of this handle.
virtual bool Visit(const XMLDeclaration &)
Visit a declaration.
virtual bool VisitEnter(const XMLDocument &)
Visit a document.
virtual const XMLElement * ToElement() const
char * ParseText(char *in, const char *endTag, int strFlags)
XMLError QueryBoolValue(bool *value) const
See QueryIntValue.
virtual XMLDocument * ToDocument()
Safely cast to a Document, or null.
Whitespace WhitespaceMode() const
float FloatValue() const
Query as a float. See IntValue()
virtual XMLDeclaration * ToDeclaration()
Safely cast to a Declaration, or null.
virtual XMLElement * ToElement()
Safely cast to an Element, or null.
void Trace(const char *name)
const XMLNode * NextSibling() const
Get the next (right) sibling node of this node.
XMLHandle(const XMLHandle &ref)
Copy constructor.
virtual const XMLDocument * ToDocument() const
const char * CStr() const
const char * Name() const
Get the name of an element (which is the Value() of the node.)
void SetInternedStr(const char *str)