Download Delve® SOA Fast-Prototyping Toolkit (Beta 1.0)
| Tutorials - How To Get All Elements in XPath, Regardless of Name |
Page 3 of 3 |
It’s also possible to use wildcards within filters, and this can be used to create XPath expressions that test all the members of one element and produce values based on the content of another. Referring back to sample document from page two—let’s say we want to make a list of all the shipping numbers for boxes with any dimension greater than a given number. This can be achieved by placing a wildcard within a filter on the “box” element.

The resultant expression uses nested filters. The inner one is a comparison filter that checks all of a box’s dimensions to see whether any are greater than forty. The outer is an “exists” filter that selects all members for which the evaluation is non-empty.
|
|
|