XPath Axes

Axes in XPath (which we will describe shortly) provide an indication of the direction we, or an XPath processor, are to travel around the tree representation of an XML document.

Directions of Axes

Axes can be viewed as being forward—that is, in document order—or reverse—that is, in the opposite direction of document order.

Proximity Position

The direction of an axis that forms part of a location step influences how any position in a predicate in that same location step is interpreted.

In a forward axis, a predicate [2] means that the second node in document order is selected.

 <SEUsingXML> <Chapter>The XML Jigsaw Puzzle</Chapter> <Chapter>The Basics of XML</Chapter> <Chapter>XML Building Blocks</Chapter> <Chapter>Structuring XML Documents ...

Get Special Edition Using XML, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.