如何检索相应的xpath [英] how to retrieve corresponding xpath
本文介绍了如何检索相应的xpath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何在Eclipse中使用eclipse平台输入xml文件时如何检索相应的xpath。
$ b
< document>
< name> xml文件< / name>
< size> 12 kb< / size>
< / document>
结果是:
/ document
/ document / name
/ document / size
解决方案
你可以通过firefox加上firebug这个功能:
- 打开在firefox中的xml,然后去firebug中的HTML视图,如果你需要XPath与命名空间,使用附加插件FireXPath
- 右键点击你想要XPath的xml-Element XPath复制
- 在Eclipse中,您可以使用插件评估XPath https://github.com/stoupa91/eclipse-xpath-evaluation-plugin Java EE版本的eclipse的XPath视图
I would like to know about how to retrieve corresponding xpaths when we input an xml file in java with eclipse platform.
For example,
<document>
<name>xml file</name>
<size>12 kb</size>
</document>
the result is:
/document
/document/name
/document/size
解决方案
You can have this feature over firefox with the plugin firebug:
- Open the xml in the firefox and then go to HTML View in the firebug, if you need the XPath with Namespaces use the Additional Plugin FireXPath
- Right Click the xml-Element you want the XPath from and make XPath Copy
- In Eclipse you can evaluate the XPath with the Plugin https://github.com/stoupa91/eclipse-xpath-evaluation-plugin the XPath View which comes with the Java EE Version of eclipse
这篇关于如何检索相应的xpath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文