Evaluate XPath 1.0 expressions against XML & HTML in real time. Auto-suggest expressions, register namespaces, and inspect every matched node instantly.
Drop your file here or
Supports: .xml, .html, .htm, .svg, .xhtml, .xsl
Results will appear here after evaluation.
A complete XPath testing environment with real-time evaluation, intelligent suggestions, and detailed node inspection.
Results appear instantly via server-side PHP DOMXPath processing. No page reloads — just pure AJAX speed.
Paste your XML and get intelligent XPath expression suggestions based on the actual document structure.
Automatically detects whether your input is well-formed XML or HTML, and parses accordingly for accurate results.
Load live XML feeds or HTML pages directly from any public URL for XPath testing against real-world content.
Register multiple namespace prefixes for querying namespaced XML documents like SOAP envelopes and Atom feeds.
Each matched node displays its type, name, full value, attribute list, child count, and precise document XPath.
Paste content directly, upload a file (.xml, .html, .svg), or fetch from a public URL.
The tool parses your document and suggests relevant XPath expressions you can click to use instantly.
Enter any XPath 1.0 expression — axes, predicates, functions like contains(), position(), count().
Click Evaluate to see matched nodes with their type, content, attributes, and full document path in the results panel.
If you work with XML documents, web scraping, automated testing, or data extraction, you need a reliable XPath query tester. XPath — short for XML Path Language — is a query language that lets you navigate and select nodes within an XML or HTML document using path expressions. Whether you are debugging an XPath selector in Selenium, building an XSLT transformation, or parsing an RSS feed, our free online XPath tester gives you instant, accurate results directly in your browser.
XPath is a W3C-standardised language used to traverse the hierarchical tree structure of XML and HTML documents. It treats a document as a tree of nodes — elements, attributes, text, comments, and processing instructions — and provides a concise syntax for pinpointing exactly which nodes you want. An XPath expression like //book[@category='fiction']/title selects the <title> element of every <book> that carries a category attribute with the value fiction.
Understanding common XPath expression patterns will help you write queries faster. Here are practical XPath examples that cover the most frequently used constructs:
/bookstore/book[1] — Selects the first <book> child of <bookstore>.//title[@lang='en'] — Selects all <title> elements where the lang attribute equals en.//*[contains(@class,'header')] — Finds any element whose class attribute contains the substring header.count(//item) — Returns the total number of <item> nodes in the document.//a[@href and starts-with(@href,'https')] — All anchor elements with an HTTPS link.normalize-space(//h1[1]/text()) — The trimmed text content of the first <h1>.The XPath specification defines thirteen axes for navigating a document tree. The most useful are child::, parent::, ancestor::, descendant::, following-sibling::, and preceding-sibling::. Combined with predicates enclosed in square brackets and built-in functions such as contains(), starts-with(), last(), position(), string-length(), and translate(), you can express almost any node-selection logic without writing a single line of imperative code.
XPath is the backbone of many scraping frameworks and test automation tools. Selenium WebDriver's By.xpath() locator, Scrapy selectors, and libxml2-based parsers all rely on XPath to target page elements precisely. When an element has no unique id or class, XPath's relative and absolute path syntax fills the gap. Testing XPath expressions before embedding them in automation scripts can save hours of debugging — which is exactly why a live XPath tester is indispensable.
Namespaced XML documents — SOAP envelopes, Atom/RSS feeds, SVG files, or custom enterprise schemas — require namespace-aware XPath queries. Our tester lets you register namespace prefixes in the format prefix=http://example.com/ns, then use those prefixes in your expression (e.g. //soap:Body/soap:Fault). Without namespace registration, XPath queries on namespaced documents return empty results, a common gotcha even for experienced developers.
Start by pasting your XML or HTML into the editor, uploading a file, or fetching content from any public URL. The tool will automatically parse the document and offer smart XPath suggestions based on its actual structure. Write or click a suggested expression, optionally add namespace mappings, then hit Evaluate XPath. The results panel lists every matched node with its type (Element, Attribute, Text, or scalar), its serialised value, all attributes, child count, and the full document path — giving you everything needed to verify and refine your XPath selectors with confidence.
prefix=uri (semicolon-separated for multiple) in the Namespace field. The tool registers them before evaluating your expression, enabling accurate queries on namespaced XML such as SOAP or Atom.SEOWebChecker.com offers 100+ free developer, SEO, and AI tools — no registration needed.