XPath Axes

Get a brief introduction about axes provided in XPath in this lesson.

What are axes?

Axis (or plural form “axes”) represents the relationship between the current context node and the target node that we want to locate in the DOM hierarchy. We have already discussed the document tree and family-like hierarchy between nodes in previous lessons.

In this lesson, we’ll learn about using XPath axes such as ancestor, descendant, parent, child, siblings ...