Inspect an XML export
Select repeated element values before an import. Output line breaks do not make the text a structured CSV file.
Paste an XML document and an XPath expression, run the query, and inspect the nodes or values that match your expression.
Invalid XML, unsupported DTD or incorrect XPath expression. Check the source and XPath 1.0 syntax.
Evaluate XPath against XML and inspect selected values, counts or conditions. The tester uses your browser’s XPath 1.0 engine and keeps both inputs on your device. It helps explore a small XML export or prepare a selector. Output is text: selecting elements returns their content rather than their complete markup. A query that works here may still need adaptation to the context of the application that will use it.
Input must be well-formed XML. The shared parser rejects DOCTYPE declarations. Evaluation starts at the complete document: /root/item starts at the root and //item searches descendants throughout the document. XPath positions start at 1, so /root/item[1] selects the first item, unlike a zero-based JSON array index. Predicates such as [@id='a'] filter by attributes.
A node selection produces one textContent value per node, separated by a line break. Nested elements contribute text but their tags are not included. Scalars appear directly: count(...) yields a number, string(...) text and boolean(...) true or false. Selecting no nodes produces empty text, which does not necessarily mean the expression is invalid.
This tester has no configured namespace prefix resolver. Expression prefixes are therefore not automatically linked to document prefixes. A default namespace can also make an unprefixed name select nothing. Use explicit local-name() and namespace-uri() predicates where necessary. XPath 2.0 and 3.1 functions, sequences and advanced types are unsupported.
Paste the complete document and enter XPath 1.0. Both fields affect the result; editing either requires another evaluation.
Run the query and check the expected result type. Nodes become text without tags; functions can return numbers or booleans.
Copy or download the text after checking spaces and line breaks. To retain XML elements, use extraction that explicitly serializes nodes.
Select repeated element values before an import. Output line breaks do not make the text a structured CSV file.
Use count(/root/item) for a number instead of a list. Distinguish zero matching elements from an expression returning an empty string.
Test an attribute filter with known elements, including both a match and an item that should be excluded.
XPath positions start at 1, so [2] selects B. The output is its text rather than the item tag.
Input
<root><item>A</item><item>B</item></root>
/root/item[2]Result
Bcount returns 2 regardless of text length. The interface displays this scalar result as text.
Input
<root><item>A</item><item>B</item></root>
count(/root/item)Result
2Check structure, letter case and namespaces. A default namespace changes element names even when there is no visible prefix.
No. This uses the browser’s XPath 1.0 engine. Later functions or sequences may cause an error.
The tester extracts textContent from each selected node. It does not serialize elements as XML or provide a reversible conversion.
boolean(...) displays false, whereas an empty node selection produces empty output. Use a scalar function when that distinction matters.
Related tools
Tools similar or complementary to this one.
Format, minify, and validate an XML document directly in your browser.
Query JSON data with a simple JSONPath expression.
Convert JSON data to XML or XML data to JSON directly in your browser.
Understand ISO 8601 week numbers, Unix timestamps in seconds or milliseconds, and the difference between human-readable dates and technical time values.