Prompted by an email from my occasional correspondent Terris and by a frankly bizarre day at work where I was required to attend but not actually do anything, I've checked in a fairly monster set of new XPath code over the past couple of days.
DOM::Document<std::string> document = getDocument(); XPath parser; XPathExpressionPtr xpath = parser.compile("/one/two/three"); XPathValuePtr result = xpath->evaluate(document); std::cout << "Selected " << result->asNodeSet().size() << " nodes.\\n"; DOM::Node<std::string> n = result->asNodeSet();OK, it looks a little wordy, but it works. An XPath expression compiled and executed. Yes!
Stuff that's in: easy memory management stuff, namespaces, all the node tests, the . and .. abbreviations.
Stuff that's not in yet: predicates, variable binding, custom functions binding, some of the axes. I know predicates sounds like a fairly catestrophic ommission, but I think it'll actually be pretty easy to implement. Ask me next week :))