- Precedes the location step to "define" the context node
- Find a node in the tree using a syntax reminescent of UNIX path names
- Relative Location Path
- Sequence of location steps separated by "/". First step selects a set of nodes.
Second step uses all those nodes as the context node and so on.
- Absolute Location Path
- Consists of "/" to denote the root node, optionally followed by a relative location path
Select all "top level" para elements in the document:
/descendent::para
|
Select the section of the third chapter of doc:
| /doc/chapter[3]/section |
|
Selects all "para" grandchildren of the context:
| */para |
|
Select an a style which has svg as an ancestor:
| //svg//style |