A few small utility functions for handling XPath expressions, separated from Annotator