是否有针对xPath选择器的在线测试器?

时间:2021-08-19 18:10:03

I know there are some online regex evaluators.. very useful, matching in real time. They are like web applications of RegexBuddy.

我知道有一些在线的regex评估程序。非常有用,实时匹配。它们就像RegexBuddy的web应用程序。

I was wondering if there is a similar thing for xPath selectors? I am just learning them and it would be valuable to me.

我想知道xPath选择器是否有类似的东西?我只是在学习,这对我很有价值。

Is there an online tester that allows you to input XML and then an xPath selector and match (live would be better, but I doubt someone has written a JavaScript interpreter?) them?

是否有一个在线测试器允许您输入XML,然后输入xPath选择器和匹配(live会更好,但我怀疑是否有人编写了JavaScript解释器)?

Thanks

谢谢

11 个解决方案

#1


88  

I notice that the only "online" checker in the answers seems a bit clunky. It requires submission to a server, and it doesn't handle namespaces properly.

我注意到,答案中唯一的“在线”检查器似乎有点笨拙。它需要提交给服务器,并且不能正确地处理名称空间。

I thought I could do better, and that such a tool would be quite useful, so I made one. I realize it is slightly self-promoting to mention it here, but it does specifically answer the question, I think!

我认为我可以做得更好,这样的工具会很有用,所以我做了一个。我意识到在这里提到它有点自我推销,但我认为它确实回答了这个问题!

http://chris.photobooks.com/xml/default.htm

http://chris.photobooks.com/xml/default.htm

Mine can apply an xpath expression to an arbitrary XML document and display the results. It can also beautify, or pretty-print an XML document, and apply an XSLT transformation to it. All processing is done by the browser, and it should work in IE6+, Firefox, Opera, Chrome, and Safari.

我可以将xpath表达式应用到任意的XML文档并显示结果。它还可以美化或美化XML文档,并对其应用XSLT转换。所有的处理都是由浏览器完成的,它应该可以在IE6+、Firefox、Opera、Chrome和Safari中工作。

Please let me know if you encounter any issues with it!

如果您遇到任何问题,请告诉我!

#2


37  

This is not an online tool; instead it's a Windows app, more along the lines of RegexBuddy, but for XPath.

这不是一个在线工具;相反,它是一个Windows应用程序,更类似于RegexBuddy,但用于XPath。

XPathVisualizer.

XPathVisualizer。

screen shot http://i29.tinypic.com/1zwp5ix.jpg

屏幕截图http://i29.tinypic.com/1zwp5ix.jpg

#3


28  

Edit: The XPath Visualizer for IE now has a new, safer home, thanks to the kindness of Lars Huttar. Also there is the XPath Visualizer for FF.

编辑:由于Lars Huttar的好意,IE的XPath可视化工具现在有了一个新的、更安全的家。还有FF的XPath可视化工具。

The XPath Visualizer has been available for more than 10 years and has helped thousands of people learn XPath the fun way. Available for IE and for FireFox.

XPath可视化工具已有10多年的历史,并帮助成千上万的人以一种有趣的方式学习XPath。可用于IE和FireFox。

The XPath Visualizer is a popular tool for learning XPath by playing with XPath expressions. Free and open source.

XPath可视化工具是通过使用XPath表达式学习XPath的一种流行工具。*和开源的。

Allows any XPath expression to be evaluated against a given XML document and displays the results hi-lighted in the xml document (if they are node(s)) or in a separate box (if the results are atomic values).

允许根据给定的XML文档计算任何XPath表达式,并在XML文档(如果它们是节点)或在单独的框(如果结果是原子值)中显示结果hi- lit。

Allows xsl:variable-s to be defined and then used in XPath expressions.

允许定义xsl:variable-s,然后在XPath表达式中使用。

Allows xsl:key-s to be defined and then referenced by key() functions within XPath expressions.

允许定义xsl:key-s,然后由XPath表达式中的key()函数引用。

#4


17  

Yep! Try the XPath Checker extension for Firefox. It's a handy tool.

是的!尝试Firefox的XPath检查扩展。这是一个方便的工具。

#5


5  

Here is a nice one: http://www.xpathtester.com/

这里有一个不错的例子:http://www.xpathtester.com/

#6


2  

You can also use Notepad++ with it's XMLTools plugin - it has xPath evaluator

您还可以使用Notepad++和它的XMLTools插件——它有xPath评估器。

#7


2  

i use this one

我使用这个

http://xpath.online-toolz.com/tools/xpath-editor.php

http://xpath.online-toolz.com/tools/xpath-editor.php

#8


1  

Here is one...

这是一个…

XPath Query Expression Tool

XPath查询表达式工具

#9


1  

I found the following tool the most helpful.

我发现下面的工具是最有用的。

Allans Online XPath Tester

阿兰斯XPath在线测试仪

The other tools mentioned below either required a particular browser or had some issue with loading xml or using some of the more obscure XPath expressions I was using. This tool did not.

下面提到的其他工具要么需要特定的浏览器,要么在加载xml时遇到了一些问题,要么使用了一些比较模糊的XPath表达式。这个工具没有。

#10


1  

Remove It Permanently, a firefox extension available on AMO, has such visualization functions. It would be nice if it had firebug type power for the slightly advanced adblocker.

永久删除它,一个在AMO上的firefox扩展,具有这样的可视化功能。如果它有firebug类型的电源为稍微高级的adblocker就好了。

screenshot http://i49.tinypic.com/n65a3d.jpg

截图http://i49.tinypic.com/n65a3d.jpg

#11


1  

If you're on Firefox, you can use Firebug + Firefinder, which enable you to filter elements based on XPath expressions, and even post the matched code to jsbin in a snap.

如果您在Firefox上,您可以使用Firebug + Firefinder,它允许您基于XPath表达式过滤元素,甚至可以将匹配的代码立即发布给jsbin。

#1


88  

I notice that the only "online" checker in the answers seems a bit clunky. It requires submission to a server, and it doesn't handle namespaces properly.

我注意到,答案中唯一的“在线”检查器似乎有点笨拙。它需要提交给服务器,并且不能正确地处理名称空间。

I thought I could do better, and that such a tool would be quite useful, so I made one. I realize it is slightly self-promoting to mention it here, but it does specifically answer the question, I think!

我认为我可以做得更好,这样的工具会很有用,所以我做了一个。我意识到在这里提到它有点自我推销,但我认为它确实回答了这个问题!

http://chris.photobooks.com/xml/default.htm

http://chris.photobooks.com/xml/default.htm

Mine can apply an xpath expression to an arbitrary XML document and display the results. It can also beautify, or pretty-print an XML document, and apply an XSLT transformation to it. All processing is done by the browser, and it should work in IE6+, Firefox, Opera, Chrome, and Safari.

我可以将xpath表达式应用到任意的XML文档并显示结果。它还可以美化或美化XML文档,并对其应用XSLT转换。所有的处理都是由浏览器完成的,它应该可以在IE6+、Firefox、Opera、Chrome和Safari中工作。

Please let me know if you encounter any issues with it!

如果您遇到任何问题,请告诉我!

#2


37  

This is not an online tool; instead it's a Windows app, more along the lines of RegexBuddy, but for XPath.

这不是一个在线工具;相反,它是一个Windows应用程序,更类似于RegexBuddy,但用于XPath。

XPathVisualizer.

XPathVisualizer。

screen shot http://i29.tinypic.com/1zwp5ix.jpg

屏幕截图http://i29.tinypic.com/1zwp5ix.jpg

#3


28  

Edit: The XPath Visualizer for IE now has a new, safer home, thanks to the kindness of Lars Huttar. Also there is the XPath Visualizer for FF.

编辑:由于Lars Huttar的好意,IE的XPath可视化工具现在有了一个新的、更安全的家。还有FF的XPath可视化工具。

The XPath Visualizer has been available for more than 10 years and has helped thousands of people learn XPath the fun way. Available for IE and for FireFox.

XPath可视化工具已有10多年的历史,并帮助成千上万的人以一种有趣的方式学习XPath。可用于IE和FireFox。

The XPath Visualizer is a popular tool for learning XPath by playing with XPath expressions. Free and open source.

XPath可视化工具是通过使用XPath表达式学习XPath的一种流行工具。*和开源的。

Allows any XPath expression to be evaluated against a given XML document and displays the results hi-lighted in the xml document (if they are node(s)) or in a separate box (if the results are atomic values).

允许根据给定的XML文档计算任何XPath表达式,并在XML文档(如果它们是节点)或在单独的框(如果结果是原子值)中显示结果hi- lit。

Allows xsl:variable-s to be defined and then used in XPath expressions.

允许定义xsl:variable-s,然后在XPath表达式中使用。

Allows xsl:key-s to be defined and then referenced by key() functions within XPath expressions.

允许定义xsl:key-s,然后由XPath表达式中的key()函数引用。

#4


17  

Yep! Try the XPath Checker extension for Firefox. It's a handy tool.

是的!尝试Firefox的XPath检查扩展。这是一个方便的工具。

#5


5  

Here is a nice one: http://www.xpathtester.com/

这里有一个不错的例子:http://www.xpathtester.com/

#6


2  

You can also use Notepad++ with it's XMLTools plugin - it has xPath evaluator

您还可以使用Notepad++和它的XMLTools插件——它有xPath评估器。

#7


2  

i use this one

我使用这个

http://xpath.online-toolz.com/tools/xpath-editor.php

http://xpath.online-toolz.com/tools/xpath-editor.php

#8


1  

Here is one...

这是一个…

XPath Query Expression Tool

XPath查询表达式工具

#9


1  

I found the following tool the most helpful.

我发现下面的工具是最有用的。

Allans Online XPath Tester

阿兰斯XPath在线测试仪

The other tools mentioned below either required a particular browser or had some issue with loading xml or using some of the more obscure XPath expressions I was using. This tool did not.

下面提到的其他工具要么需要特定的浏览器,要么在加载xml时遇到了一些问题,要么使用了一些比较模糊的XPath表达式。这个工具没有。

#10


1  

Remove It Permanently, a firefox extension available on AMO, has such visualization functions. It would be nice if it had firebug type power for the slightly advanced adblocker.

永久删除它,一个在AMO上的firefox扩展,具有这样的可视化功能。如果它有firebug类型的电源为稍微高级的adblocker就好了。

screenshot http://i49.tinypic.com/n65a3d.jpg

截图http://i49.tinypic.com/n65a3d.jpg

#11


1  

If you're on Firefox, you can use Firebug + Firefinder, which enable you to filter elements based on XPath expressions, and even post the matched code to jsbin in a snap.

如果您在Firefox上,您可以使用Firebug + Firefinder,它允许您基于XPath表达式过滤元素,甚至可以将匹配的代码立即发布给jsbin。