XPath

As discussed in the beginning of the chapter, XSLT is the language with which an XML document can be transformed into another XML document, HTML, or even plain text.

The XSLT stylesheet has two parts: a pattern that is matched against the node of an XML document, and a template that specifies what is to be done when the pattern is matched. When the pattern is found, the set of XML nodes that match the pattern are selected, and the XSLT templates apply the transformation on the selected XML nodes.

The pattern is specified using the XPath language. The pattern is an expression. An expression is defined in terms of either complete/relative location paths to the nodes or functions, or a combination of both.

An expression is evaluated with respect ...

Get Java™ APIs for XML Kick Start 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.