| 11443 | } |
| 11444 | |
| 11445 | PUGI__FN xpath_node xpath_query::evaluate_node(const xpath_node& n) const |
| 11446 | { |
| 11447 | impl::xpath_ast_node* root = impl::evaluate_node_set_prepare(static_cast<impl::xpath_query_impl*>(_impl)); |
| 11448 | if (!root) return xpath_node(); |
| 11449 | |
| 11450 | impl::xpath_context c(n, 1, 1); |
| 11451 | impl::xpath_stack_data sd; |
| 11452 | |
| 11453 | #ifdef PUGIXML_NO_EXCEPTIONS |
| 11454 | if (setjmp(sd.error_handler)) return xpath_node(); |
| 11455 | #endif |
| 11456 | |
| 11457 | impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_first); |
| 11458 | |
| 11459 | return r.first(); |
| 11460 | } |
| 11461 | |
| 11462 | PUGI__FN const xpath_parse_result& xpath_query::result() const |
| 11463 | { |
no test coverage detected