XPath Tester
Paste XML, write an XPath expression and see the matching nodes, or the number or string it returns. Uses the browser’s built-in XPath 1.0 engine, the same one used by Selenium and Playwright locators.
How it works
/ starts at the root, // searches all descendants, @ selects an attribute, [] adds a predicate such as [price>30] or [1], and functions like count(), contains() and text() are available.
Default namespaces are a common trap: if the document declares xmlns="...", plain element names do not match. Use local-name(), for example //*[local-name()="item"].
Everything above runs in JavaScript inside this tab. Your data is not uploaded. Inputs are remembered in this browser only so they survive a reload; you can switch that off on the privacy page.
Questions
Does it support XPath 2.0 or 3.1?
No. Browsers implement XPath 1.0, which covers node selection, predicates and the core functions.
Why does //item return nothing?
Most likely the document has a default namespace. Try //*[local-name()="item"].