diff --git a/tinyxml2.h b/tinyxml2.h index 7220930..003ef43 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -1458,7 +1458,7 @@ public: XMLError QueryAttribute(const char* name, const char** value) const { return QueryStringAttribute(name, value); - } + } /// Sets the named attribute to value. void SetAttribute( const char* name, const char* value ) { diff --git a/xmltest.cpp b/xmltest.cpp index 77cd6d7..4937dcb 100755 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -632,6 +632,10 @@ int main( int argc, const char ** argv ) ele->SetAttribute( "int", 1 ); ele->SetAttribute( "double", -1.0 ); + const char* answer = 0; + ele->QueryAttribute("str", &answer); + XMLTest("Query char attribute", "strValue", answer); + const char* cStr = ele->Attribute( "str" ); { XMLError queryResult = ele->QueryIntAttribute( "int", &iVal );