How XPath Works

The XPath specification is the foundation for a variety of specifications, including XSLT and linking/addressing specifications such as XPointer. So an understanding of XPath is fundamental to a lot of advanced XML usage. This section provides a thorough introduction to XPath in the context of XSLT so that you can refer to it as needed.

Note

In this tutorial, you won't actually use XPath until later, in the section, Transforming XML Data with XSLT (page 278). So, if you like, you can skip this section and go on ahead to the next section, Writing Out a DOM as an XML File (page 257). (When you get to the end of that section, there will be a note that refers you back here so that you don't forget!)

XPath Expressions

In general, an ...

Get The J2EE™ Tutorial Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.