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

@@ -827,6 +827,14 @@ int main( int argc, const char ** argv )
XMLTest("Attribute: unsigned", (int)XML_SUCCESS, queryResult, true);
XMLTest("Attribute: unsigned", unsigned(100), v, true);
}
{
const char* v = "failed";
int queryResult = element->QueryStringAttribute("not-attrib", &v);
XMLTest("Attribute: string default", false, queryResult == XML_SUCCESS);
queryResult = element->QueryStringAttribute("attrib", &v);
XMLTest("Attribute: string", (int)XML_SUCCESS, queryResult, true);
XMLTest("Attribute: string", "100", v);
}
XMLTest("Attribute: unsigned", unsigned(100), element->UnsignedAttribute("attrib"), true);
}
{