add query string method

This commit is contained in:
Lee Thomason
2017-12-28 14:07:47 -08:00
parent 4155ac0c73
commit 5b00e0662f
2 changed files with 19 additions and 0 deletions

View File

@@ -1361,6 +1361,17 @@ public:
return a->QueryFloatValue( value );
}
/// See QueryIntAttribute()
XMLError QueryStringAttribute(const char* name, const char** value) const {
const XMLAttribute* a = FindAttribute(name);
if (!a) {
return XML_NO_ATTRIBUTE;
}
*value = a->Value();
return XML_SUCCESS;
}
/** Given an attribute name, QueryAttribute() returns
XML_SUCCESS, XML_WRONG_ATTRIBUTE_TYPE if the conversion