Download Delve® SOA Fast-Prototyping Toolkit (Beta 1.0)
| Tutorials - How to Use an Axis in XPath (advanced) |
Page 1 of 1 |
XPath axes are use for creating very sophisticated filters, and often provide an alternative to using a filter. They make it possible for a single XPath expression to reference many different parts of a document.
To apply an axis, we qualify an XML document member name with one of several different axis prefixes. Instead of using the standard “:” prefix connector, XPath has us connect member and axis names with a “double colon.” Suppose we have an XML document that represents a set of parents…

… and we want to list the last names of parents with sons. This can be accomplished using a filter, but it can also be accomplished using the “ancestor” axis.

|
|
|