| 12777 | } |
| 12778 | |
| 12779 | PUGI__FN xpath_node_set xpath_query::evaluate_node_set(const xpath_node& n) const |
| 12780 | { |
| 12781 | impl::xpath_ast_node* root = impl::evaluate_node_set_prepare(static_cast<impl::xpath_query_impl*>(_impl)); |
| 12782 | if (!root) return xpath_node_set(); |
| 12783 | |
| 12784 | impl::xpath_context c(n, 1, 1); |
| 12785 | impl::xpath_stack_data sd; |
| 12786 | |
| 12787 | impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_all); |
| 12788 | |
| 12789 | if (sd.oom) |
| 12790 | { |
| 12791 | #ifdef PUGIXML_NO_EXCEPTIONS |
| 12792 | return xpath_node_set(); |
| 12793 | #else |
| 12794 | throw std::bad_alloc(); |
| 12795 | #endif |
| 12796 | } |
| 12797 | |
| 12798 | return xpath_node_set(r.begin(), r.end(), r.type()); |
| 12799 | } |
| 12800 | |
| 12801 | PUGI__FN xpath_node xpath_query::evaluate_node(const xpath_node& n) const |
| 12802 | { |
no test coverage detected