6.1. Introduction to XPath
An XPath expression specifies a part of any XML object to which it is applied.
XPath models XML as a hierarchical tree of nodes. The best way of thinking of this structure is to say the following: An XPath operation takes an XPath node-set (or XML converted into an XPath node-set) and then tags certain nodes in that set as being selected. As long as you stay in the world of XPath node-sets, the entire original node-set remains accessible through XPath operations that can find related nodes from any starting node in the set. For example, XPath operations can find ancestor or descendant nodes. As soon as you leave the XPath world with a selected node-set, all nodes not output are lost. In XML Security, the nodes output ...
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