Download Delve® SOA Fast-Prototyping Toolkit (Beta 1.0)
| Tutorials - How To Use XPath to Get Elements Globally |
Page 1 of 1 |
In “How to Use XPath to Set and Get Element Values,” we took a look at how the accessor operator can be used to obtain XML element contents. This lesson explains how element values can be gathered from throughout an XML document.
XPath statements allow use of a “double-forward-slash” notation “//” to obtain element values for all (or a large portion of) an XML document. In Tectonic, this is accomplished using an operator known as the “global accessor,” which is also represented by two forward slashes.
Consider an element in which pet owners and their pets have their names placed in elements called “full-name.”

To get the names of everyone in the document, pets and owners alike, we can use the statement.

|
|
|