Is there an online tester for xPath selectors?

XmlXsltXpath

Xml Problem Overview


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

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

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?

Thanks

Xml Solutions


Solution 1 - Xml

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

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.

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

Solution 2 - Xml

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

XPathVisualizer.

screen shot

Solution 3 - Xml

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.

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.

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

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).

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

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

Solution 4 - Xml

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

Solution 5 - Xml

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

Solution 6 - Xml

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

Solution 7 - Xml

Solution 8 - Xml

Solution 9 - Xml

I found the following tool the most helpful.

Allans Online XPath Tester

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.

Solution 10 - Xml

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.

screenshot

Solution 11 - Xml

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

[1]: http://getfirebug.com/ "Firebug" [2]: http://robertnyman.com/firefinder/ "Firefinder" [3]: http://jsbin.com/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionalexView Question on Stackoverflow
Solution 1 - XmlChris NielsenView Answer on Stackoverflow
Solution 2 - XmlCheesoView Answer on Stackoverflow
Solution 3 - XmlDimitre NovatchevView Answer on Stackoverflow
Solution 4 - XmlJohn FeminellaView Answer on Stackoverflow
Solution 5 - Xmluser431529View Answer on Stackoverflow
Solution 6 - XmlDrorView Answer on Stackoverflow
Solution 7 - XmlinistyView Answer on Stackoverflow
Solution 8 - XmlalexView Answer on Stackoverflow
Solution 9 - XmlTodd MeinershagenView Answer on Stackoverflow
Solution 10 - Xmlnormal userView Answer on Stackoverflow
Solution 11 - XmlasymmetricView Answer on Stackoverflow