XPath Defined

You saw in the previous chapter how XSLT walks a source tree; identifies elements, attributes, and so on; and uses this information to construct a result tree. The component used to walk these document trees is the XML Path Language (XPath). Specifically, XPath is a language for examining XML document trees and extracting whole nodes, node text, or numbers related to the tree itself. For example, you can get the number of <chapter> elements in the entire document or return the title of the seventh chapter.

Although the XPath language was originally included in the XSLT specification released by the W3C, it is now published in a separate document and is referenced by several specifications, including XSLT. For example, XPath is ...

Get Special Edition Using XSLT 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.