Tool Workspace
Enter content, process with one click
1Introduction
XPath is a language for finding information in XML documents, commonly used in web scraping and XML parsing. This tool helps you test whether XPath expressions are correct and view the matching results. Simply input the XML content and XPath expression, and the tool will execute the query using the browser's XPath parser and display the matched nodes or text values. Supports common XPath functions and axes, such as `//div[@class='example']`.
2How to Use
Enter XML
Paste the XML document into the first input box.
Enter XPath
Enter the XPath expression in the second input box.
Click Test
Click the 'Test XPath' button.
View Result
View the list of matched nodes or values.
3FAQ
Which XPath versions are supported?
Supports XPath 1.0, which is the version natively supported by browsers and covers most common needs.
How to view the text of matched nodes?
The tool displays the text content of each matched node; if it is an element node, it shows its inner text.