Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX - |
Contents
Index
![]() ![]() |
Appendix B Format of Search, Return and Sort Expressions | > B.2 Common Format |
The XML document structure is represented as a tree.
Path expressions are used to describe the position of nodes within the XML tree structure.
The format of path expressions is shown below.
Path elements are used to identify individual element nodes in an XML document.
Path elements are described in the following table:
Path element |
Description |
---|---|
Element name |
Indicates the name of an element node. |
Indicates all of the element nodes below the upper node. |
Path operators express the relationship between path elements.
Path operators are described in the following table:
Path operator |
Description |
---|---|
The target will be the node below the upper node. |
|
// |
The target will be all descendent nodes below the upper node. |
Symbols '//' and '*' cannot be entered consecutively in path expressions.
Example
An example path expression is shown below.
Document
<company> <name>fujitsu</name> <employee> <name>smith</name> <id>2000</id> </employee> </company> |
/company/employee/name |
This path expression indicates the 'name' element node below the 'employee' element node below the 'company' element node below the root node. This node is indicated by (1) in the figure above.
//name |
This path expression indicates all 'name' element nodes below the root node. These nodes are indicated by (1) and (2) in the figure above.
/company/*/id |
This path expression indicates an 'id' element node below any element node ('name' or 'employee' in the example of the figure above) below the 'company' element node below the root node. This node is indicated by (3) in the figure above.
Contents
Index
![]() ![]() |