Is there any XPath processor for SAX model?

2020-01-25 15:42发布

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.

标签: java xml xpath sax
14条回答
淡お忘
2楼-- · 2020-01-25 16:27

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.

查看更多
forever°为你锁心
3楼-- · 2020-01-25 16:31

The standard javax xpath API technically already works with streams; javax.xml.xpath.XPathExpression can be evaluated against an InputSource, which in turn can be constructed with a Reader. I don't think it constructs a DOM under the covers.

查看更多
登录 后发表回答