Documentation
Urho3D::XPathQuery Class Reference
XPath query. More...
#include <XMLElement.h>
Collaboration diagram for Urho3D::XPathQuery:
Public Member Functions | |
XPathQuery () | |
Construct empty. | |
XPathQuery (const String &queryString, const String &variableString=String::EMPTY) | |
Construct XPath query object with query string and variable string. The variable string format is "name1:type1,name2:type2,..." where type is one of "Bool", "Float", "String", "ResultSet". | |
~XPathQuery () | |
Destruct. | |
void | Bind () |
Bind query object with variable set. | |
bool | SetVariable (const String &name, bool value) |
Add/Set a bool variable. Return true if successful. | |
bool | SetVariable (const String &name, float value) |
Add/Set a float variable. Return true if successful. | |
bool | SetVariable (const String &name, const String &value) |
Add/Set a string variable. Return true if successful. | |
bool | SetVariable (const char *name, const char *value) |
Add/Set a string variable. Return true if successful. | |
bool | SetVariable (const String &name, const XPathResultSet &value) |
Add/Set an XPath query result set variable. Return true if successful. | |
bool | SetQuery (const String &queryString, const String &variableString=String::EMPTY, bool bind=true) |
Set XPath query string and variable string. The variable string format is "name1:type1,name2:type2,..." where type is one of "Bool", "Float", "String", "ResultSet". | |
void | Clear () |
Clear by removing all variables and XPath query object. | |
bool | EvaluateToBool (XMLElement element) const |
Evaluate XPath query and expecting a boolean return value. | |
float | EvaluateToFloat (XMLElement element) const |
Evaluate XPath query and expecting a float return value. | |
String | EvaluateToString (XMLElement element) const |
Evaluate XPath query and expecting a string return value. | |
XPathResultSet | Evaluate (XMLElement element) const |
String | GetQuery () const |
Return query string. | |
pugi::xpath_query * | GetXPathQuery () const |
Return pugixml xpath_query. | |
pugi::xpath_variable_set * | GetXPathVariableSet () const |
Return pugixml xpath_variable_set. | |
Private Attributes | |
String | queryString_ |
XPath query string. | |
pugi::xpath_query * | query_ |
Pugixml xpath_query. | |
pugi::xpath_variable_set * | variables_ |
Pugixml xpath_variable_set. | |
Detailed Description
XPath query.
Member Function Documentation
XPathResultSet Urho3D::XPathQuery::Evaluate | ( | XMLElement | element | ) | const |
Evaluate XPath query and expecting an XPath query result set as return value. Note: The XPathResultSet return value must be stored in a lhs variable to ensure the underlying xpath_node_set* is still valid while performing XPathResultSet::FirstResult(), XPathResultSet::operator [], and XMLElement::NextResult().
Here is the call graph for this function:
The documentation for this class was generated from the following files:
- /home/travis/build/urho3d/Urho3D/Source/Urho3D/Resource/XMLElement.h
- /home/travis/build/urho3d/Urho3D/Source/Urho3D/Resource/XMLElement.cpp