Complex location paths
Apart from the selection of children, it has already been shown that parents and further ancestors of the current element can also be selected. But there are many other options available, and each can be thought of as a direction, or an ' axis'. A particular axis is indicated using an 'axis specifier'. One axis specifier has already been seen; the 'child::' axis specifier selects the child axis.
Close family
Parents, children and siblings can be selected using the 'parent::', 'child::', 'preceding-sibling::' and 'following-sibling::' axis specifiers:
The ' parent::' prefix, along with the 'node()' function, is equivalent ...
Get XML Companion, The, Third 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.