流XPath评估 [英] Streaming XPath evaluation
问题描述
一个完整的XPath实现,由于XPath语法允许:
/ AAA / XXX / following :: *
和
AAA / BBB / follow-sibling :: *
这意味着先行要求?即从一个特定的节点,你将不得不加载文档的其余部分。
Nux 库(具体来说, StreamingPathFilter )提出了这一点,并引用了依赖于XPath的子集的一些实现。 Nux声称执行一些流式查询功能,但鉴于上述情况,XPath实现将会有一些限制。
Are there any production-ready libraries for streaming XPath expressions evaluation against provided xml-document? My investigations show that most of existing solutions load entire DOM-tree into memory before evaluating xpath expression.
Would this be practical for a complete XPath implementation, given that XPath syntax allows for:
/AAA/XXX/following::*
and
/AAA/BBB/following-sibling::*
which implies look-ahead requirements ? i.e. from a particular node you're going to have to load the rest of the document anyway.
The doc for the Nux library (specifically StreamingPathFilter) makes this point, and references some implementations that rely on a subset of XPath. Nux claims to perform some streaming query capability, but given the above there will be some limitations in terms of XPath implementation.
这篇关于流XPath评估的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!