ancestor
Selects all ancestors, such as parent or grandparent, of the current node. For example, the predicate expression "ancestor::book" selects all book ancestors of the current node.
ancestor-or-self
Selects all ancestors, such as parent or grandparent, of the current node, as well as the current node. For example, the predicate expression "ancestor-or-self::book" selects all book ancestors of the current node, and the current node also.
attribute
Selects all attributes of the current node. For example, the predicate expression "attribute::lang" selects the lang attribute of the current node.
child
Selects all children of the current node. For example, the predicate expression "child::book" selects all book nodes that are children of the current node.
descendant
Selects all descendants, such as children or grandchildren, of the current node. For example, the predicate expression "descendant::book" selects all book descendants of the current node.
descendant-or-self
Selects all descendants, such as children or grandchildren, of the current node, as well as the current node. For example, the predicate expression "descendant-or-self::book" selects all book descendants of the current node, and the current node as well if it is a book node.
following
Selects everything in the document after the closing tag of the current node. For example, the predicate expression "following::book" selects everything in the document after the closing tag of the book node.
following-sibling
Selects all siblings following after the current node. For example, the predicate expression "following-sibling::book" selects all the siblings in the document after the book node.
namespace
Selects all namespace nodes of the current node.
parent
Selects the parent of the current node. For example, the predicate expression "parent::book" selects the lang attribute of the current node.
preceding
Selects all nodes that appear before the current node in the document, except ancestors, attribute nodes and namespace nodes. For example, the predicate expression "preceding::book" selects the nodes before the book node.
preceding-sibling
Selects all siblings that appear before the current node in the document. For example, the predicate expression "preceding-sibling::book" selects the sibling nodes before the book node.
self
Selects the current node. For example, the predicate expression "self::book" selects the current book node.