summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp17
-rw-r--r--src/pugixml.hpp9
2 files changed, 21 insertions, 5 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 6f230dd..99cdfc0 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -11152,13 +11152,13 @@ namespace pugi
return !_impl;
}
- PUGI__FN xpath_node xml_node::select_single_node(const char_t* query, xpath_variable_set* variables) const
+ PUGI__FN xpath_node xml_node::select_node(const char_t* query, xpath_variable_set* variables) const
{
xpath_query q(query, variables);
- return select_single_node(q);
+ return select_node(q);
}
- PUGI__FN xpath_node xml_node::select_single_node(const xpath_query& query) const
+ PUGI__FN xpath_node xml_node::select_node(const xpath_query& query) const
{
return query.evaluate_node(*this);
}
@@ -11173,6 +11173,17 @@ namespace pugi
{
return query.evaluate_node_set(*this);
}
+
+ PUGI__FN xpath_node xml_node::select_single_node(const char_t* query, xpath_variable_set* variables) const
+ {
+ xpath_query q(query, variables);
+ return select_single_node(q);
+ }
+
+ PUGI__FN xpath_node xml_node::select_single_node(const xpath_query& query) const
+ {
+ return query.evaluate_node(*this);
+ }
}
#endif
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 2947bf4..e252e16 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -585,12 +585,17 @@ namespace pugi
#ifndef PUGIXML_NO_XPATH
// Select single node by evaluating XPath query. Returns first node from the resulting node set.
- xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const;
- xpath_node select_single_node(const xpath_query& query) const;
+ xpath_node select_node(const char_t* query, xpath_variable_set* variables = 0) const;
+ xpath_node select_node(const xpath_query& query) const;
// Select node set by evaluating XPath query
xpath_node_set select_nodes(const char_t* query, xpath_variable_set* variables = 0) const;
xpath_node_set select_nodes(const xpath_query& query) const;
+
+ // (deprecated: use select_node instead) Select single node by evaluating XPath query.
+ xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const;
+ xpath_node select_single_node(const xpath_query& query) const;
+
#endif
// Print subtree using a writer object