From f0f7ac697bddede3fd06bacde9eaa29ce59139b2 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 8 Nov 2009 19:05:05 +0000 Subject: 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 --- src/pugixml.hpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/pugixml.hpp') 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 -- cgit v1.2.3