XPath - Introduction to the language for the navigation in XML structures
XPath is the language for the navigation in XML documents. It is part of the XSL family and serves as a basis for further standards like XQuery and XPointer. In addition to the addressing and selection of contents of a XML document, XPath makes it also possible to perform certain operations via defined functions. In the following, only the functions most commonly used for our purposes will be introduced. The complex structure of XPath expressions may become a problem not only for beginners, but also for experts. Even the slightest error in a XPath expression may lead to the fact that no results are returned. Or even worse is the case if an error in a XPath expression causes the delivery of incorrect results. In order to check XPath expressions, various free XPath testers and XPath visualizers can be found in the World Wide Web.
In the following example a XPath expression is checked with the help of the XPath tester.
How to use the XPath Tester
1. Call up the XPath tester under www.xpathtester.com.
2. Copy the content of your XML file into the XML window.
3. Enter the required XPath expression in the "XPath:" input field and press the "Test!" button.
The result of the selection by the XPath expression appears in the XML window:
|<< back||next >>|