Beginning XML Databases (Wrox Beginning Guides)
| ||
| ||
|
XPath axes define and allow access to any node within an XML document, from the current node, relative to that current node. XPath axes are a little like giving directions, allowing navigation through an XML document, using the XPath data model for an XML document, as established by XPath. An XPath axis gives directions from whatever the current node is in, in terms of the current node being a current location or context within an XML document, as established by XPath.
The current node is the node currently found by the most recently executed XPath expression. Figure 10-11 shows the various XPath axes that can be used. Technically, one can find any node, from any node, using the XPath axes.
The syntax for applying an XPath axis is as follows :
axis::test-on-node[predicate]
Figure 10-12 shows some example uses of XPath axes.
| ||
| ||
|