XPath
Addressing nodes inside an XML document.
XPath is taught here in 3 lessons, running from Location paths and axes through to XPath in XSLT and in code. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | XML & Web Services |
| Lessons | 3 |
| Level | Beginner |
| Reading time | about 39 minutes |
| Prerequisites | Helpful, but not required: XML |
Lessons
- Location paths and axesThe XPath data model, absolute and relative paths, the axes you will actually use, and node tests that select the right node type.
- Predicates and functionsFiltering node-sets with predicates, positional versus value tests, and the string, number and boolean functions you will use most.
- XPath in XSLT and in codeHow XPath drives XSLT select and match attributes, and the same expressions in Python, Java, JavaScript and the shell.
More in XML & Web Services
XML XSLT SOAP RESTful APIs RSS & Atom
FAQ
How long does the XPath course take?
It has 3 lessons, about 39 minutes of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for XPath?
Not strictly. It helps to have read XML first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after XPath?
Continue with XSLT (3 lessons), the next course in XML & Web Services.
Last refreshed 2026-09-18.