Best XPath tools

86,694

Solution 1

If you're in a web dev environment, Firefox has a number of great tools for XPath support and analysis:

  • Firebug has built-in XPath support
  • XPath Checker I have found to be great

and also maybe of use:

  • XPath Runner
  • FireXPath

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.

Solution 2

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

enter image description here

Solution 3

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.

Solution 4

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.

Solution 5

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.

Share:
86,694
Sayed Ibrahim Hashimi
Author by

Sayed Ibrahim Hashimi

Sayed Ibrahim Hashimi has a computer engineering degree from the University of Florida. He currently works at Microsoft as a Program Manager helping to create better Web development tools. Previously he was a Microsoft Visual C# MVP.He is the author of Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build (Microsoft Press 01/09), co-author of Deploying .NET Application: Learning MSBuild and Click Once (Apress 05/2006), and has written several publications for magazines such as the MSDN Magazine. He is a developer and independent consultant in Jacksonville, Florida. He is an expert in the financial, education, and collection industries. You can reach Sayed at his blog sedodream.com. Or you can contact me at http://sedotech.com/Home/Contact

Updated on August 03, 2021

Comments

  • Sayed Ibrahim Hashimi
    Sayed Ibrahim Hashimi almost 3 years

    What tools are you guys using for XPath and why? Right now I'm using

    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.

  • Steve Bennett
    Steve Bennett about 13 years
    XPath Checker crashed Firefox on my 35Mb XML file.
  • csharpforevermore
    csharpforevermore about 12 years
    Seems that it won't work with namespaces. Tried {w3.org/2005/Atom}entry and got nothing whereas in code, I got values. Anyone else had better luck?
  • zhaorufei
    zhaorufei over 11 years
    Thanks for your excellent work. It's really worthy to mention that how to bring up the "Xpath Editor", I almost give up this invaluable utility just because I cannot manually edit an Xpath. :-)
  • Optimus1
    Optimus1 over 11 years
    Thanks @pgfearo this is a really nice tool.
  • David Clarke
    David Clarke over 11 years
    Useful tool but has an annoying System Modal dialog when entering XPath query. Also would be useful to allow expanding multi-line text area for entering XPath query.
  • pgfearo
    pgfearo over 11 years
    @DavidClarke Will see what I can do for the next release. In the mean time there's also Pathenq - an online XPath 2.0 tool I maintain.
  • David Clarke
    David Clarke over 11 years
    Thanks Philip, appreciate the quick response.
  • Talon
    Talon about 11 years
    This program does not handle large files. 50mb = OutOfMemoryException
  • CodyBugstein
    CodyBugstein over 10 years
    It's crap, it doesn't let you search XPath
  • pgfearo
    pgfearo over 3 years
    As the author of XMLQuire, the plan is to retire this in mid 2021 and replace it with the Visual Studio Code XPath 3.1 Notebook extension - currently a Work in Progress.
  • pgfearo
    pgfearo almost 3 years
    XMLQuire has now been retired and replaced by a VS Code extension. I've updated the answer to reflect this.