Axes and Node Tests
The axis of a location step indicates where to look for the objects to select. By specifying the relationship to the current object, the axis defines the direction of the search through the object hierarchy of the content store. For example, the ancestor
axis specifies that the search is to be conducted in the hierarchy above the current object.
If you do not specify an axis in a location step, the child
axis is implied. For example, the following search path is abbreviated:
/content/package/folder
The unabbreviated syntax is:
/child::content/child::package/child::folder
A node test identifies a set of objects in an axis. The node test filters the objects, based on their class.
For example, in the location step child::folder
, child
is the axis and folder
is the node test that filters out all objects but those of class folder
.
You can use the asterisk (*) as a wildcard character in a node test to match all objects in the set. For example, the following search path selects all objects that are children of the package
object GO Sales and Retailers:
//package[@name='GO Sales and Retailers']/*