Arabica: Milestone alert!

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.

Get this

  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()[0];

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 catastrophic omission, but I think it’ll actually be pretty easy to implement.


Tagged code, arabica, xml, and c++


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired



Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired