The XPath Tester - Evaluator is an essential online tool designed for developers and data analysts who work with XML documents and need to test their XPath expressions. This free tool provides a straightforward interface to input XML data and XPath queries, allowing you to quickly evaluate and debug your expressions.
Whether you're working with small XML snippets or large, complex documents, the XPath Tester - Evaluator tool simplifies the testing process, allowing you to develop accurate and efficient XPath queries. Enhance your XML data manipulation skills and streamline your workflow with this powerful online tool.
All of the following examples utilize this sample XML structure. For more information on XPath expressions, refer to W3Schools.com.
<catalog xmlns:music="http://www.music.org/" xmlns:movie="http://www.movie.org">
<films>
<film id="1">Inception</film>
<film id="2">Interstellar</film>
<film id="3">Dunkirk</film>
</films>
<music:artists>
<music:artist id="4">Adele</music:artist>
<music:artist id="5">Beyoncé</music:artist>
<music:artist id="6">Ed Sheeran</music:artist>
</music:artists>
</catalog>
/
/catalog
/catalog/films/film
//music:artist
//music:artist/@id
//film[1]/text()
//film[last()]
//film[position() < 3]
//film[@id]
//film[@id='2']
//film[@id <= 2]
/catalog/music:artists/*
//
//film | //music:artist
name(//*[1])
number(//film[1]/@id)
string(//film[1]/@id)
string-length(//film[1]/text())
local-name(//music:artist[1])
count(//music:artist)
sum(//music:artist/@id)