Paste in XML or a URL, drop a file, , or load an to begin.

Ctrl + Enter

Your results will appear here

Paste your data or a URL above, or start with one of these:

Tip: press Ctrl + Enter in the editor to process.

  • XPath 1.0Axes, predicates and functions such as count() or contains().
  • Node pathsGet the absolute path or the text value of every match.
  • 100% localYour data never leaves the browser. No uploads, no tracking.
  • NamespacesPrefixes declared in the document work out of the box.

XPath examplesSyntax reference ↗

All book titles
/store/book/title→Sayings of the Century, Sword of Honour, Moby Dick, The Lord of the Rings
First book
/store/book[1]/title→Sayings of the Century
Last book
/store/book[last()]/title→The Lord of the Rings
Books with an isbn attribute
//book[@isbn]/title→Moby Dick, The Lord of the Rings
Books under 10
//book[price < 10]/title→Sayings of the Century, Moby Dick
Authors of fiction books
//book[@category='fiction']/author→Evelyn Waugh, Herman Melville, J. R. R. Tolkien
Every isbn attribute
//@isbn→0-553-21311-3, 0-395-19395-8
Number of books
count(//book)→4
Title contains text
//title[contains(., 'Lord')]→The Lord of the Rings