summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-10-20 20:34:28 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-10-20 20:34:28 -0700
commitd7ac5e2e0cb0521af1628e95774ad418af82af58 (patch)
tree2fca26ab47941b0511de460de0fc58f0a2882024 /src/pugixml.hpp
parentfcd1876a21593bd62580383874b57c734d629a0c (diff)
parent7258aea09be1847b3dcc99ca389990027d4a92d3 (diff)
Merge branch 'master' into compact
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 69b2cb2..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
@@ -1134,6 +1139,12 @@ namespace pugi
// If PUGIXML_NO_EXCEPTIONS is defined, returns empty node set instead.
xpath_node_set evaluate_node_set(const xpath_node& n) const;
+ // Evaluate expression as node set in the specified context.
+ // Return first node in document order, or empty node if node set is empty.
+ // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors.
+ // If PUGIXML_NO_EXCEPTIONS is defined, returns empty node instead.
+ xpath_node evaluate_node(const xpath_node& n) const;
+
// Get parsing result (used to get compilation errors in PUGIXML_NO_EXCEPTIONS mode)
const xpath_parse_result& result() const;