Cisco Cisco Process Orchestrator 3.0 Guida Utente

Pagina di 242
 
12-7
Cisco Process Orchestrator User Guide
OL-30196-01
Chapter 12      Advanced Authoring Concepts
  Using Core Activities
XPath Example Syntax
For path expressions that can be used when selecting nodes in a path expression of a XPath query, see 
the Cisco Process Orchestrator online help. 
XPath Query Example
The following is an example of source XML. 
The following example path expressions and related results are based on the preceding source XML. 
For additional examples, see 
Example XML
<?xml version=”1.0” encoding=”ISO-8859-1”?>
<bookstore>
<book>
  <title lang=”eng”>Harry Potter</title>
  <price>29.99</price>
</book>
<book>
  <title lang=”eng”>Learning XML</title>
  <price>39.95</price>
</book>
</bookstore>
Path Expression
Description
bookstore
Selects all child nodes of the bookstore element 
/bookstore
Selects the root element bookstore
Note
If the path starts with a slash ( / ) it always 
represents an absolute path to an element.
bookstore/book
Selects all book elements that are children of bookstore
//book
Selects all book elements no matter where they are in the 
document 
bookstore//book 
Selects all book elements that are descendant of the 
bookstore element, no matter where they are under the 
bookstore element 
//@lang
Selects all attributes that are named lang