I need to handle large XML files, and I decided to move from DOM parser to VTD-XML.
When I used Java's DOM parser, I could evaluate XPath queries from any node, not from the root. Look at XPath.evaluate prototype:
Object evaluate(String expression,
Object item,
QName returnType)
throws XPathExpressionException
Object item
is the starting context (a node, for example). This is very useful.
But I can't find the way to do the same in VTD-XML. I have read its API and read many examples, for instance, this one, but everywhere queries are executed from the root.
How to do that?