Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX - |
Contents
Index
![]() ![]() |
Appendix E Notes on XML Documents | > E.3 Notes on the XML Format |
If @ is used as the starting character for the element name, the element cannot be searched even it is specified in the path expression.
In the rule of XML, @ cannot be used as the starting character for the element name.
The following examples assume that Documents A and B below, exist.
Document A
<doc> <employee id="0001"> smith </employee> </doc> |
Document B
<doc> <employee> <@id>0001 </@id> <name>smith</name> </employee> </doc> |
Example 1
Search for document whose employee id (id) consists of the keyword '0001'.
/doc/employee/@id='0001' |
Result: Only Document A is returned. (Document B is not returned)
When specifying the attribute expression in the search expression, if the element name specified in the path element starts with @, a syntax error will occur.
Document A
<doc> <@employee> <id>0001 </id> <name>smith</name> </@employee> </doc> |
Example 2
Search for document whose employee id (id) consists of the keyword '0001'.
/doc/@employee/id='0001' |
Result: A syntax error will occur.
Contents
Index
![]() ![]() |