Home >Online Product Documentation >Table of Contents >Syntax for Specifying an Axis in a Query
The previous sections provide examples of XPath expression syntax that uses abbreviations. This section introduces you to the axis syntax that many of the abbreviations represent. For a list of XPath abbreviations, see XPath Abbreviations Quick Reference.
You can use axis syntax to specify a location path in a query. An axis specifies the tree relationship between the nodes selected by an expression and the context node. The syntax for specifying an axis in a query is as follows:
axis_name::node_test
::
The axis names are defined in Supported Axes.
A node test is a simple expression that tests for a specified node type or node name. For example:
node()
text()
text
CDATA
comment()
comment
processing-instruction()
processing-instruction(
)
*
XPath 2.0 adds additional tests, such as
element()
attribute()
document-node()
In addition, you can follow the node test with any number of filters.