最佳 XPath 工具
你们使用哪些 XPath 工具?为什么? 现在我正在使用
- SketchPath 因为它非常棒,但它是一个需要安装的 Windows 应用程序
- WhiteBeam 在线 XPath 测试床因为您可以从
SketchPath 网站测试表达式对我来说最重要的是因为它实际上可以帮助您创建 xpath 并且它非常先进。如果你还没有尝试过,你应该尝试一下。
SketchPath 的缺点:你必须将它安装在机器上,否则它会很棒。
WhiteBeam 的缺点:您必须上传文件,出于安全原因我并不总是希望这样做,而且您可以上传的文件大小有一些限制,而且上传文件无论如何都很烦人。另外,我认为该工具使用的 xpath 与运行 .NET 应用程序时使用的 xpath 之间可能存在一些细微的差异。但现在什么都不记得了。请记住这一点。
What tools are you guys using for XPath and why?
Right now I'm using
- SketchPath because its totally awesome, but its a windows app that needs to be installed
- WhiteBeam online XPath test bedbecause you can test expressions from the website
SketchPath seems to stand out the most to me because it actually helps you create the xpath and it is very advanced. If you haven't tried it you should.
Cons to SketchPath: you have to install it on the machine, otherwise it is fantastic.
Cons to WhiteBeam: you have to upload your file which I don't always want to do for security reasons and the file size you can upload has some limit on it, and uploading a file is annoying anyways. Also I think there might be some subtle differences between the xpath used for that tool and when running a .NET app. But don't remember any right now. Just keep it in mind.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
[更新] XMLQuire 最初是在这个答案中推荐的。它是一款适用于 Windows 的免费 XML 编辑器,内置了用于 XPath 测试的 SketchPath XPath 编辑器。
XMLQuire 已经有几年没有维护了,现在已经退役了。
对于 XPath 实验等,XMLQuire 的作者现在推荐使用 XPath Notebook 扩展Visual Studio 代码。由同一作者开发,现在支持 Saxonica 的 Saxon-JS 处理器。
[Update] XMLQuire was originally recommended in this answer. It was a free XML editor for Windows with the SketchPath XPath Editor built in for XPath testing.
XMLQuire has not been maintained for a few years and has now been retired.
For XPath experimentation etc. XMLQuire's author now recommends the XPath Notebook extension for Visual Studio Code. Developed by the same author, this now supports XPath 3.1 courtesy of Saxonica's Saxon-JS processor.
如果您处于 Web 开发环境中,Firefox 有许多用于 XPath 支持和分析的出色工具:
并且可能有用:
XPath Firebug - 右键单击“复制 XPath”命令会将路径复制为全部小写,并且某些 XML 解析器(如 FinalBuilder 中使用的 MXSML 解析器)区分大小写 - 因此您需要更正 Firebug 的大小写-复制 XPath 语句,否则您的解析器将找不到任何匹配的节点。
If you're in a web dev environment, Firefox has a number of great tools for XPath support and analysis:
and also maybe of use:
Be careful with Firebug - the right-click "copy XPath" command copies the path as all lower-case, and some XML parsers (like the MXSML parser used in FinalBuilder) are case-sensitive - so you'll need to correct the casing of your Firebug-copied XPath statement otherwise your parser won't find any matching nodes.
使用这个 xpath 测试器,您可以测试标准 XPath 表达式
您还可以随时保存 XPath 和 XML 以便返回稍后再查看或在网络或电子邮件中发布链接,这是一个非常方便的功能。
with this xpath tester you can test standard XPath expressions
You can also save your XPath's and XMLs at any point of time to return to it later or post a link in web or email, which is a really handy feature.
SketchPath 是我迄今为止使用过的最好的 XPath 工具。我也使用过 oXygen,但对于 XPath,我更喜欢 SketchPath,而不是 oXygen。
SketchPath is the best tool for XPath that I have used so far. I have used oXygen as well, but prefer SketchPath to oXygen for XPath.
我喜欢 XPather,一个 Firefox 插件。它简单且易于使用,并且只要您运行 Firefox,就可以运行它,而这正是我通常使用 XPath 的时间和地点。
I like XPather, a Firefox plugin. It's simple and easy-to-use and it's not a separate program to run as long as you have Firefox running which is when and where I'm usually using XPath.
我使用 oXygen 进行 xpath 工作。根据文件中的 xml 测试表达式相当容易。您只需设置一次目标 xml 文件,然后只需单击一个按钮即可测试您的表达式。
I use oXygen for xpath work. It's rather easy to test your expression against xml on file. You set the target xml file once and then it's just a button to click to test your expression.