I'm looking for an XPath evaluator that doesn't rebuild the whole DOM document to look for the nodes of a document: actually the object is to manage a large amount of XML data (ideally over 2Gb) with SAX model, which is very good for memory management, and give the possibility to search for nodes.
Thank you all for the support!
For all those who say it's not possible: I recently, after asked the question, found a project named "saxpath" (http://www.saxpath.org/), but I can't find any implementing project.
My current list (compiled from web search results and the other answers) is:
The next step is to use the examples of XMLDog and compare the performance of all these approaches. Then, the test cases should be extended to the supported XPath expressions.
The standard javax xpath API technically already works with streams;
javax.xml.xpath.XPathExpression
can be evaluated against anInputSource
, which in turn can be constructed with aReader
. I don't think it constructs a DOM under the covers.