Axis steps
An axis step consists of three parts: an optional axis, a node test, and zero or more predicates.
The node test specifies the criteria used to select nodes. The predicates filter the sequence that is returned by the axis step.
The result of an axis step is always a sequence of zero or more nodes, and these nodes are returned in document order. An axis step can be either a forward step, which starts at the context node and moves down through the XML tree, or a reverse step, which starts at the context node and moves up through the XML tree. If the context item is not a node, then the expression results in a type error.
The unabbreviated syntax for an axis step consists of an axis name and node test that are separated by a double colon. The syntax of an axis expression can be abbreviated by omitting the axis and using shorthand notations.
Syntax
Example
child is
the name of the axis and price is the name of the
element nodes to be selected on this axis. child::priceThe
axis step in this example selects all price elements
that are children of the context node.