XPathEvaluator 在 android web 浏览器中在哪里? [英] Where is XPathEvaluator in android web browser?

查看:49
本文介绍了XPathEvaluator 在 android web 浏览器中在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用 XPathEvaluator 对象(在 javascript 中)在 Safari、Google Chrome 和 iPhone 上的 Safari 上进行 xpath 评估.但是在 android 上,浏览器说 XPathEvaluator 对象未定义.

We can use the XPathEvaluator object(in javascript) to do xpath evaluation on Safari,Google Chrome and Safari on Iphone. But on android the browser said that the XPathEvaluator object is undefined.

那么如何获取 XPathEvaluator 对象的实例,或者是否有其他解决方案可以在 android 浏览器上执行 xpath 评估?

So how can I get a instance of XPathEvaluator object, or is there any other solution to perform xpath evaluation on android browser?

推荐答案

抱歉,目前有 Android 中没有 XPath.如果您真的需要 XPath,则必须使用 JavaScript 实现(eg).这会很慢,所以如果可以的话,最好选择 DOM 遍历.

Sorry, there is currently no XPath in Android. If you really need XPath you'll have to use a JavaScript implementation (eg). This'll be slow, so prefer DOM traversal if you can.

这篇关于XPathEvaluator 在 android web 浏览器中在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆