Cross-browser XPath implementation in JavaScript

前端 未结 12 1426
有刺的猬
有刺的猬 2020-12-08 04:32

I\'m looking for a XPath library to query over XML documents in FF, IE, Opera and Safari... and couldn\'t find one. Have you seen any?

12条回答
  •  有刺的猬
    2020-12-08 04:57

    Take a look at http://dev.abiss.gr/sarissa/ project. They have migrated most of XML-related APIs to IE, as well as evaluate method on document object. And indeed, jQuery doesn't have an XPath processor, it has a very simple path selector like: /a/b/c only

提交回复
热议问题