summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-11-08 19:05:05 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-11-08 19:05:05 +0000
commitf0f7ac697bddede3fd06bacde9eaa29ce59139b2 (patch)
treeb520d825f34dddda9de8ee014bf1d125002bcf8a /src/pugixml.hpp
parent85f97d8e0842d7a4cb08ad997140df4d61be5440 (diff)
XPath: Added xpath_query::return_type() function, fixed evaluate_node_set documentation
git-svn-id: http://pugixml.googlecode.com/svn/trunk@232 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 4fba668..4c447dc 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -258,6 +258,16 @@ namespace pugi
class xpath_ast_node;
class xpath_allocator;
+ /// XPath query return type classification
+ enum xpath_type_t
+ {
+ xpath_type_none, ///< Unknown type (query failed to compile)
+ xpath_type_node_set, ///< Node set (\see xpath_node_set)
+ xpath_type_number, ///< Number
+ xpath_type_string, ///< String
+ xpath_type_boolean ///< Boolean
+ };
+
/**
* A class that holds compiled XPath query and allows to evaluate query result
*/
@@ -286,6 +296,13 @@ namespace pugi
* Dtor
*/
~xpath_query();
+
+ /**
+ * Get query expression return type
+ *
+ * \return expression return type
+ **/
+ xpath_type_t return_type() const;
/**
* Evaluate expression as boolean value for the context node \a n.
@@ -322,7 +339,7 @@ namespace pugi
/**
* Evaluate expression as node set for the context node \a n.
- * If expression does not directly evaluate to node set, function returns empty node set.
+ * If expression does not directly evaluate to node set, throws xpath_exception.
* Throws std::bad_alloc on out of memory error.
*
* \param n - context node