XPath: evaluate_node_set (and select_nodes/select_single_node) now throw exception if expression return type is not node set (instead of assertion)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@223 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
74737f97ba
commit
6783bf0c32
1 changed files with 1 additions and 0 deletions
|
@ -3679,6 +3679,7 @@ namespace pugi
|
|||
xpath_node_set xpath_query::evaluate_node_set(const xml_node& n) const
|
||||
{
|
||||
if (!m_root) return xpath_node_set();
|
||||
if (m_root->rettype() != ast_type_node_set) throw xpath_exception("Expression does not evaluate to node set");
|
||||
|
||||
xpath_context c;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue