XPath Tester / Evaluator
To use this free online XPath tester paste your code into the editor on the left or upload using the options below.
What is this tool?
It is a simple online tool that you can use to test XPath expressions against your XML code. It supports features found in XPath 1.0 and 2.0.
To begin using this tester paste your XML into the editor on the left or use the options below to upload a file from your computer or a location on the internet.
You can then type your expressions in and click the "test" button to see the result in the editor on the right.
XML Code and Expression Examples
Below is XML code and a list of working XPath expressions to demonstrate how one could extract different elements of information from it.
<root xmlns:foo="http://www.foo.org" xmlns:bar="http://www.bar.org"> <cast> <actor id="1">Ted Levine</actor> <actor id="2">Kathleen Quinlan</actor> <actor id="3">Dan Byrd</actor> <actor id="4">Emilie de Ravin</actor> <actor id="5">Aaron Stanford</actor> <actor id="6">Vinessa Shaw</actor> </cast> <writers> <writer id="1">Wes Craven (based upon his film)</writer> <writer id="2">Alexandre Aja (screenplay)</writer> </writers> <foo:crew> <director id="5">Alexandre Aja</director> </foo:crew> </root>