All books
- Input
- /catalogo/livro
- Expected output
- 3 resultados
Absolute path from the root.
xpath tester online xml
On the Tree tab, switch the search to XPath, write the expression and click a result to jump straight to the node. The examples below use the three-book catalog that ships as the tool sample.
Absolute path from the root.
Returns the titles of the algorithms and networks books.
Only the 120.00 book passes.
last() is the size of the sibling set.
Compares the text of the autor element.
The dot is the node itself, here the title text.
Drop the file on the upload area or pick it with the button. The tool detects the encoding (UTF-8, UTF-16 or the one declared in the header, such as ISO-8859-1), shows the formatted text and builds the tree. You can also paste the content. Any text editor or browser can open XML, but only here do you get formatting, a tree, search and NF-e reading in one place with nothing to install.
A subset of XPath 1.0: paths, //, attributes, positions, last(), comparisons, contains, starts-with, not, count, and and or. Named axes and union are not included.
Write just the local name, such as //numero, and it matches ex:numero. To restrict to one prefix, write the full name, //ex:numero.
Click a result to select the node and use the buttons that copy the path and the value. The list shows each hit's full path, ready to paste.