Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gamaral/tinyxml2
Browse files Browse the repository at this point in the history
  • Loading branch information
leethomason committed Mar 20, 2012
2 parents 87e475a + 2eb7003 commit d7e033e
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 80 deletions.
4 changes: 4 additions & 0 deletions Makefile
@@ -0,0 +1,4 @@
all: xmltest
xmltest: xmltest.cpp tinyxml2.cpp tinyxml2.h
clean:
rm -f *.o xmltest
51 changes: 24 additions & 27 deletions tinyxml2.cpp
Expand Up @@ -23,13 +23,10 @@ distribution.


#include "tinyxml2.h" #include "tinyxml2.h"


#include <string.h> #include <cstdarg>
#include <stdlib.h> #include <cstdio>
#include <stdio.h> #include <cstdlib>
#include <ctype.h>
#include <new> #include <new>
#include <stdarg.h>



using namespace tinyxml2; using namespace tinyxml2;


Expand Down Expand Up @@ -684,7 +681,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
DELETE_NODE( node ); DELETE_NODE( node );
node = 0; node = 0;
if ( !document->Error() ) { if ( !document->Error() ) {
document->SetError( ERROR_PARSING, 0, 0 ); document->SetError( XML_ERROR_PARSING, 0, 0 );
} }
break; break;
} }
Expand All @@ -703,16 +700,16 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
XMLElement* ele = node->ToElement(); XMLElement* ele = node->ToElement();
if ( ele ) { if ( ele ) {
if ( endTag.Empty() && ele->ClosingType() == XMLElement::OPEN ) { if ( endTag.Empty() && ele->ClosingType() == XMLElement::OPEN ) {
document->SetError( ERROR_MISMATCHED_ELEMENT, node->Value(), 0 ); document->SetError( XML_ERROR_MISMATCHED_ELEMENT, node->Value(), 0 );
p = 0; p = 0;
} }
else if ( !endTag.Empty() && ele->ClosingType() != XMLElement::OPEN ) { else if ( !endTag.Empty() && ele->ClosingType() != XMLElement::OPEN ) {
document->SetError( ERROR_MISMATCHED_ELEMENT, node->Value(), 0 ); document->SetError( XML_ERROR_MISMATCHED_ELEMENT, node->Value(), 0 );
p = 0; p = 0;
} }
else if ( !endTag.Empty() ) { else if ( !endTag.Empty() ) {
if ( !XMLUtil::StringEqual( endTag.GetStr(), node->Value() )) { if ( !XMLUtil::StringEqual( endTag.GetStr(), node->Value() )) {
document->SetError( ERROR_MISMATCHED_ELEMENT, node->Value(), 0 ); document->SetError( XML_ERROR_MISMATCHED_ELEMENT, node->Value(), 0 );
p = 0; p = 0;
} }
} }
Expand All @@ -735,14 +732,14 @@ char* XMLText::ParseDeep( char* p, StrPair* )
if ( this->CData() ) { if ( this->CData() ) {
p = value.ParseText( p, "]]>", StrPair::NEEDS_NEWLINE_NORMALIZATION ); p = value.ParseText( p, "]]>", StrPair::NEEDS_NEWLINE_NORMALIZATION );
if ( !p ) { if ( !p ) {
document->SetError( ERROR_PARSING_CDATA, start, 0 ); document->SetError( XML_ERROR_PARSING_CDATA, start, 0 );
} }
return p; return p;
} }
else { else {
p = value.ParseText( p, "<", document->ProcessEntities() ? StrPair::TEXT_ELEMENT : StrPair::TEXT_ELEMENT_LEAVE_ENTITIES ); p = value.ParseText( p, "<", document->ProcessEntities() ? StrPair::TEXT_ELEMENT : StrPair::TEXT_ELEMENT_LEAVE_ENTITIES );
if ( !p ) { if ( !p ) {
document->SetError( ERROR_PARSING_TEXT, start, 0 ); document->SetError( XML_ERROR_PARSING_TEXT, start, 0 );
} }
if ( p && *p ) { if ( p && *p ) {
return p-1; return p-1;
Expand Down Expand Up @@ -794,7 +791,7 @@ char* XMLComment::ParseDeep( char* p, StrPair* )
const char* start = p; const char* start = p;
p = value.ParseText( p, "-->", StrPair::COMMENT ); p = value.ParseText( p, "-->", StrPair::COMMENT );
if ( p == 0 ) { if ( p == 0 ) {
document->SetError( ERROR_PARSING_COMMENT, start, 0 ); document->SetError( XML_ERROR_PARSING_COMMENT, start, 0 );
} }
return p; return p;
} }
Expand Down Expand Up @@ -841,7 +838,7 @@ char* XMLDeclaration::ParseDeep( char* p, StrPair* )
const char* start = p; const char* start = p;
p = value.ParseText( p, "?>", StrPair::NEEDS_NEWLINE_NORMALIZATION ); p = value.ParseText( p, "?>", StrPair::NEEDS_NEWLINE_NORMALIZATION );
if ( p == 0 ) { if ( p == 0 ) {
document->SetError( ERROR_PARSING_DECLARATION, start, 0 ); document->SetError( XML_ERROR_PARSING_DECLARATION, start, 0 );
} }
return p; return p;
} }
Expand Down Expand Up @@ -888,7 +885,7 @@ char* XMLUnknown::ParseDeep( char* p, StrPair* )


p = value.ParseText( p, ">", StrPair::NEEDS_NEWLINE_NORMALIZATION ); p = value.ParseText( p, ">", StrPair::NEEDS_NEWLINE_NORMALIZATION );
if ( !p ) { if ( !p ) {
document->SetError( ERROR_PARSING_UNKNOWN, start, 0 ); document->SetError( XML_ERROR_PARSING_UNKNOWN, start, 0 );
} }
return p; return p;
} }
Expand Down Expand Up @@ -939,15 +936,15 @@ int XMLAttribute::QueryIntValue( int* value ) const
{ {
if ( TIXML_SSCANF( Value(), "%d", value ) == 1 ) if ( TIXML_SSCANF( Value(), "%d", value ) == 1 )
return XML_NO_ERROR; return XML_NO_ERROR;
return WRONG_ATTRIBUTE_TYPE; return XML_WRONG_ATTRIBUTE_TYPE;
} }




int XMLAttribute::QueryUnsignedValue( unsigned int* value ) const int XMLAttribute::QueryUnsignedValue( unsigned int* value ) const
{ {
if ( TIXML_SSCANF( Value(), "%u", value ) == 1 ) if ( TIXML_SSCANF( Value(), "%u", value ) == 1 )
return XML_NO_ERROR; return XML_NO_ERROR;
return WRONG_ATTRIBUTE_TYPE; return XML_WRONG_ATTRIBUTE_TYPE;
} }




Expand All @@ -964,23 +961,23 @@ int XMLAttribute::QueryBoolValue( bool* value ) const
*value = false; *value = false;
return XML_NO_ERROR; return XML_NO_ERROR;
} }
return WRONG_ATTRIBUTE_TYPE; return XML_WRONG_ATTRIBUTE_TYPE;
} }




int XMLAttribute::QueryDoubleValue( double* value ) const int XMLAttribute::QueryDoubleValue( double* value ) const
{ {
if ( TIXML_SSCANF( Value(), "%lf", value ) == 1 ) if ( TIXML_SSCANF( Value(), "%lf", value ) == 1 )
return XML_NO_ERROR; return XML_NO_ERROR;
return WRONG_ATTRIBUTE_TYPE; return XML_WRONG_ATTRIBUTE_TYPE;
} }




int XMLAttribute::QueryFloatValue( float* value ) const int XMLAttribute::QueryFloatValue( float* value ) const
{ {
if ( TIXML_SSCANF( Value(), "%f", value ) == 1 ) if ( TIXML_SSCANF( Value(), "%f", value ) == 1 )
return XML_NO_ERROR; return XML_NO_ERROR;
return WRONG_ATTRIBUTE_TYPE; return XML_WRONG_ATTRIBUTE_TYPE;
} }




Expand Down Expand Up @@ -1132,7 +1129,7 @@ char* XMLElement::ParseAttributes( char* p )
while( p ) { while( p ) {
p = XMLUtil::SkipWhiteSpace( p ); p = XMLUtil::SkipWhiteSpace( p );
if ( !p || !(*p) ) { if ( !p || !(*p) ) {
document->SetError( ERROR_PARSING_ELEMENT, start, Name() ); document->SetError( XML_ERROR_PARSING_ELEMENT, start, Name() );
return 0; return 0;
} }


Expand All @@ -1144,7 +1141,7 @@ char* XMLElement::ParseAttributes( char* p )
p = attrib->ParseDeep( p, document->ProcessEntities() ); p = attrib->ParseDeep( p, document->ProcessEntities() );
if ( !p || Attribute( attrib->Name() ) ) { if ( !p || Attribute( attrib->Name() ) ) {
DELETE_ATTRIBUTE( attrib ); DELETE_ATTRIBUTE( attrib );
document->SetError( ERROR_PARSING_ATTRIBUTE, start, p ); document->SetError( XML_ERROR_PARSING_ATTRIBUTE, start, p );
return 0; return 0;
} }
LinkAttribute( attrib ); LinkAttribute( attrib );
Expand All @@ -1160,7 +1157,7 @@ char* XMLElement::ParseAttributes( char* p )
break; break;
} }
else { else {
document->SetError( ERROR_PARSING_ELEMENT, start, p ); document->SetError( XML_ERROR_PARSING_ELEMENT, start, p );
return 0; return 0;
} }
} }
Expand Down Expand Up @@ -1353,7 +1350,7 @@ int XMLDocument::LoadFile( const char* filename )
#pragma warning ( pop ) #pragma warning ( pop )
#endif #endif
if ( !fp ) { if ( !fp ) {
SetError( ERROR_FILE_NOT_FOUND, filename, 0 ); SetError( XML_ERROR_FILE_NOT_FOUND, filename, 0 );
return errorID; return errorID;
} }
LoadFile( fp ); LoadFile( fp );
Expand Down Expand Up @@ -1383,7 +1380,7 @@ int XMLDocument::LoadFile( FILE* fp )
p = XMLUtil::SkipWhiteSpace( p ); p = XMLUtil::SkipWhiteSpace( p );
p = XMLUtil::ReadBOM( p, &writeBOM ); p = XMLUtil::ReadBOM( p, &writeBOM );
if ( !p || !*p ) { if ( !p || !*p ) {
SetError( ERROR_EMPTY_DOCUMENT, 0, 0 ); SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
return errorID; return errorID;
} }


Expand Down Expand Up @@ -1414,13 +1411,13 @@ int XMLDocument::Parse( const char* p )
InitDocument(); InitDocument();


if ( !p || !*p ) { if ( !p || !*p ) {
SetError( ERROR_EMPTY_DOCUMENT, 0, 0 ); SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
return errorID; return errorID;
} }
p = XMLUtil::SkipWhiteSpace( p ); p = XMLUtil::SkipWhiteSpace( p );
p = XMLUtil::ReadBOM( p, &writeBOM ); p = XMLUtil::ReadBOM( p, &writeBOM );
if ( !p || !*p ) { if ( !p || !*p ) {
SetError( ERROR_EMPTY_DOCUMENT, 0, 0 ); SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
return errorID; return errorID;
} }


Expand Down
81 changes: 41 additions & 40 deletions tinyxml2.h
Expand Up @@ -24,19 +24,20 @@ distribution.
#ifndef TINYXML2_INCLUDED #ifndef TINYXML2_INCLUDED
#define TINYXML2_INCLUDED #define TINYXML2_INCLUDED



#include <cctype>
#include <limits.h> #include <climits>
#include <ctype.h> #include <cstdio>
#include <stdio.h> #include <cstring>
#include <memory.h> // Needed by mac. #if __APPLE__
# include <memory.h>
#endif


/* /*
TODO: add 'lastAttribute' for faster parsing. TODO: add 'lastAttribute' for faster parsing.
TODO: intern strings instead of allocation. TODO: intern strings instead of allocation.
*/ */
/* /*
gcc: g++ -Wall tinyxml2.cpp xmltest.cpp -o gccxmltest.exe gcc: g++ -Wall tinyxml2.cpp xmltest.cpp -o gccxmltest.exe
*/ */


#if defined( _DEBUG ) || defined( DEBUG ) || defined (__DEBUG__) #if defined( _DEBUG ) || defined( DEBUG ) || defined (__DEBUG__)
Expand Down Expand Up @@ -120,15 +121,15 @@ class StrPair
ATTRIBUTE_NAME = 0, ATTRIBUTE_NAME = 0,
ATTRIBUTE_VALUE = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION, ATTRIBUTE_VALUE = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION,
ATTRIBUTE_VALUE_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION, ATTRIBUTE_VALUE_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION,
COMMENT = NEEDS_NEWLINE_NORMALIZATION, COMMENT = NEEDS_NEWLINE_NORMALIZATION
}; };


StrPair() : flags( 0 ), start( 0 ), end( 0 ) {} StrPair() : flags( 0 ), start( 0 ), end( 0 ) {}
~StrPair(); ~StrPair();


void Set( char* start, char* end, int flags ) { void Set( char* start_, char* end_, int flags_ ) {
Reset(); Reset();
this->start = start; this->end = end; this->flags = flags | NEEDS_FLUSH; this->start = start_; this->end = end_; this->flags = flags_ | NEEDS_FLUSH;
} }
const char* GetStr(); const char* GetStr();
bool Empty() const { return start == end; } bool Empty() const { return start == end; }
Expand Down Expand Up @@ -381,7 +382,7 @@ class XMLUtil
} }
return false; return false;
} }
inline static int IsUTF8Continuation( unsigned char p ) { return p & 0x80; } inline static int IsUTF8Continuation( const char p ) { return p & 0x80; }
inline static int IsAlphaNum( unsigned char anyByte ) { return ( anyByte < 128 ) ? isalnum( anyByte ) : 1; } inline static int IsAlphaNum( unsigned char anyByte ) { return ( anyByte < 128 ) ? isalnum( anyByte ) : 1; }
inline static int IsAlpha( unsigned char anyByte ) { return ( anyByte < 128 ) ? isalpha( anyByte ) : 1; } inline static int IsAlpha( unsigned char anyByte ) { return ( anyByte < 128 ) ? isalpha( anyByte ) : 1; }


Expand Down Expand Up @@ -472,7 +473,7 @@ class XMLNode
element with the specified name. element with the specified name.
*/ */
const XMLElement* FirstChildElement( const char* value=0 ) const; const XMLElement* FirstChildElement( const char* value=0 ) const;
XMLElement* FirstChildElement( const char* value=0 ) { return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->FirstChildElement( value )); } XMLElement* FirstChildElement( const char* value_=0 ) { return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->FirstChildElement( value_ )); }


/// Get the last child node, or null if none exists. /// Get the last child node, or null if none exists.
const XMLNode* LastChild() const { return lastChild; } const XMLNode* LastChild() const { return lastChild; }
Expand All @@ -482,23 +483,23 @@ class XMLNode
element with the specified name. element with the specified name.
*/ */
const XMLElement* LastChildElement( const char* value=0 ) const; const XMLElement* LastChildElement( const char* value=0 ) const;
XMLElement* LastChildElement( const char* value=0 ) { return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->LastChildElement(value) ); } XMLElement* LastChildElement( const char* value_=0 ) { return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->LastChildElement(value_) ); }


/// Get the previous (left) sibling node of this node. /// Get the previous (left) sibling node of this node.
const XMLNode* PreviousSibling() const { return prev; } const XMLNode* PreviousSibling() const { return prev; }
XMLNode* PreviousSibling() { return prev; } XMLNode* PreviousSibling() { return prev; }


/// Get the previous (left) sibling element of this node, with an opitionally supplied name. /// Get the previous (left) sibling element of this node, with an opitionally supplied name.
const XMLElement* PreviousSiblingElement( const char* value=0 ) const ; const XMLElement* PreviousSiblingElement( const char* value=0 ) const ;
XMLElement* PreviousSiblingElement( const char* value=0 ) { return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->PreviousSiblingElement( value ) ); } XMLElement* PreviousSiblingElement( const char* value_=0 ) { return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->PreviousSiblingElement( value_ ) ); }


/// Get the next (right) sibling node of this node. /// Get the next (right) sibling node of this node.
const XMLNode* NextSibling() const { return next; } const XMLNode* NextSibling() const { return next; }
XMLNode* NextSibling() { return next; } XMLNode* NextSibling() { return next; }


/// Get the next (right) sibling element of this node, with an opitionally supplied name. /// Get the next (right) sibling element of this node, with an opitionally supplied name.
const XMLElement* NextSiblingElement( const char* value=0 ) const; const XMLElement* NextSiblingElement( const char* value=0 ) const;
XMLElement* NextSiblingElement( const char* value=0 ) { return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->NextSiblingElement( value ) ); } XMLElement* NextSiblingElement( const char* value_=0 ) { return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->NextSiblingElement( value_ ) ); }


/** /**
Add a child node as the last (right) child. Add a child node as the last (right) child.
Expand Down Expand Up @@ -616,7 +617,7 @@ class XMLText : public XMLNode
virtual const XMLText* ToText() const { return this; } virtual const XMLText* ToText() const { return this; }


/// Declare whether this should be CDATA or standard text. /// Declare whether this should be CDATA or standard text.
void SetCData( bool isCData ) { this->isCData = isCData; } void SetCData( bool isCData_ ) { this->isCData = isCData_; }
/// Returns true if this is a CDATA text element. /// Returns true if this is a CDATA text element.
bool CData() const { return isCData; } bool CData() const { return isCData; }


Expand Down Expand Up @@ -724,22 +725,22 @@ enum {
XML_NO_ERROR = 0, XML_NO_ERROR = 0,
XML_SUCCESS = 0, XML_SUCCESS = 0,


NO_ATTRIBUTE, XML_NO_ATTRIBUTE,
WRONG_ATTRIBUTE_TYPE, XML_WRONG_ATTRIBUTE_TYPE,


ERROR_FILE_NOT_FOUND, XML_ERROR_FILE_NOT_FOUND,
ERROR_ELEMENT_MISMATCH, XML_ERROR_ELEMENT_MISMATCH,
ERROR_PARSING_ELEMENT, XML_ERROR_PARSING_ELEMENT,
ERROR_PARSING_ATTRIBUTE, XML_ERROR_PARSING_ATTRIBUTE,
ERROR_IDENTIFYING_TAG, XML_ERROR_IDENTIFYING_TAG,
ERROR_PARSING_TEXT, XML_ERROR_PARSING_TEXT,
ERROR_PARSING_CDATA, XML_ERROR_PARSING_CDATA,
ERROR_PARSING_COMMENT, XML_ERROR_PARSING_COMMENT,
ERROR_PARSING_DECLARATION, XML_ERROR_PARSING_DECLARATION,
ERROR_PARSING_UNKNOWN, XML_ERROR_PARSING_UNKNOWN,
ERROR_EMPTY_DOCUMENT, XML_ERROR_EMPTY_DOCUMENT,
ERROR_MISMATCHED_ELEMENT, XML_ERROR_MISMATCHED_ELEMENT,
ERROR_PARSING XML_ERROR_PARSING
}; };




Expand Down Expand Up @@ -773,7 +774,7 @@ class XMLAttribute


/** QueryIntAttribute interprets the attribute as an integer, and returns the value /** QueryIntAttribute interprets the attribute as an integer, and returns the value
in the provided paremeter. The function will return XML_NO_ERROR on success, in the provided paremeter. The function will return XML_NO_ERROR on success,
and WRONG_ATTRIBUTE_TYPE if the conversion is not successful. and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful.
*/ */
int QueryIntValue( int* value ) const; int QueryIntValue( int* value ) const;
/// See QueryIntAttribute /// See QueryIntAttribute
Expand Down Expand Up @@ -855,8 +856,8 @@ class XMLElement : public XMLNode
float FloatAttribute( const char* name ) const { float f=0; QueryFloatAttribute( name, &f ); return f; } float FloatAttribute( const char* name ) const { float f=0; QueryFloatAttribute( name, &f ); return f; }


/** Given an attribute name, QueryIntAttribute() returns /** Given an attribute name, QueryIntAttribute() returns
XML_NO_ERROR, WRONG_ATTRIBUTE_TYPE if the conversion XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion
can't be performed, or NO_ATTRIBUTE if the attribute can't be performed, or XML_NO_ATTRIBUTE if the attribute
doesn't exist. If successful, the result of the conversion doesn't exist. If successful, the result of the conversion
will be written to 'value'. If not successful, nothing will will be written to 'value'. If not successful, nothing will
be written to 'value'. This allows you to provide default be written to 'value'. This allows you to provide default
Expand All @@ -867,15 +868,15 @@ class XMLElement : public XMLNode
QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10 QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
@endverbatim @endverbatim
*/ */
int QueryIntAttribute( const char* name, int* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return NO_ATTRIBUTE; return a->QueryIntValue( value ); } int QueryIntAttribute( const char* name, int* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryIntValue( value ); }
/// See QueryIntAttribute() /// See QueryIntAttribute()
int QueryUnsignedAttribute( const char* name, unsigned int* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return NO_ATTRIBUTE; return a->QueryUnsignedValue( value ); } int QueryUnsignedAttribute( const char* name, unsigned int* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryUnsignedValue( value ); }
/// See QueryIntAttribute() /// See QueryIntAttribute()
int QueryBoolAttribute( const char* name, bool* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return NO_ATTRIBUTE; return a->QueryBoolValue( value ); } int QueryBoolAttribute( const char* name, bool* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryBoolValue( value ); }
/// See QueryIntAttribute() /// See QueryIntAttribute()
int QueryDoubleAttribute( const char* name, double* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return NO_ATTRIBUTE; return a->QueryDoubleValue( value ); } int QueryDoubleAttribute( const char* name, double* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryDoubleValue( value ); }
/// See QueryIntAttribute() /// See QueryIntAttribute()
int QueryFloatAttribute( const char* name, float* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return NO_ATTRIBUTE; return a->QueryFloatValue( value ); } int QueryFloatAttribute( const char* name, float* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryFloatValue( value ); }


/// Sets the named attribute to value. /// Sets the named attribute to value.
void SetAttribute( const char* name, const char* value ) { XMLAttribute* a = FindOrCreateAttribute( name ); a->SetAttribute( value ); } void SetAttribute( const char* name, const char* value ) { XMLAttribute* a = FindOrCreateAttribute( name ); a->SetAttribute( value ); }
Expand Down Expand Up @@ -1219,7 +1220,7 @@ class XMLPrinter : public XMLVisitor
}; };




}; // tinyxml2 } // tinyxml2






Expand Down

0 comments on commit d7e033e

Please sign in to comment.