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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access