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 |
An attribute Expression specifies the value of the attribute nodes of the particular element nodes in an XML document displayed by the path expressions.
The definition format for attribute expressions is shown below.
If the '//' path operator is specified at the end of a path expression, the '/' after the path expression will be omitted.
The path expression is used to identify the positions of particular element nodes of an XML document in the tree structure.
Refer to B.2.1 Path Expressions for more information on path expression syntax.
Specify the name of the attribute nodes of the element nodes specified in the path expression. '@' has to be specified before the attribute name. Specifying '*' selects all the attribute nodes of the particular element nodes specified in path expression.
The element name starting with @ cannot be specified in the path element of the attribute expressions.
Example
An example attribute expression is shown below.
<company> <name>fujitsu</name> <employee position="chief"> <name>smith</name> <id>2000</id> </employee> </company>
/company/employee/@position |
This expression shows the value of the attribute node 'position' of the 'employee' element node. This value is 'chief' indicated by (1) in the above figure.
Contents
Index
![]() ![]() |