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.3 Search Expressions |
This method searches for documents where the value of the element node, the value of the text node, or the value of the attribute node completely matches the value specified by the string, or for documents where the specified size relationship holds. Size comparisons involving strings can be made and so this method can be used with searches for values that contain a mixture of numbers and characters, such as date searches.
The following figure shows the definition for strings.
Finds out if the value of the element node, the value of text node, or the value of attribute node is equal to the string.
Example
/root/date == '2006/03/09' |
This expression will be TRUE if the value of the element node indicated by '/root/date' is equal to the string '2006/03/09'.
Even if any element node in an XML document is a 0-byte-long empty string, it can be searched using complete match specification.Example
/doc/detail/taxi == ''TRUE if the value of the element node represented by /doc/detail/taxi is an empty string.
Compares the size of the value of the element node, the value of text node, or the value of attribute node to the specified string, going from left to right using the character code value (the hexadecimal code value of a character). Dates and times must use the following formats:
Example
/root/date > '2006/03/09' |
This expression compares the character code value of the element node indicated by '/root/date' to the character code value of the string '2006/03/09' one character at a time, starting from the leftmost character, and evaluates to TRUE if the character code value of the element node indicated by '/root/date' is larger.
For string comparisons, make sure that the string specified as the keyword is the same length as the value of the element node, the value of text node, or the value of attribute node (within the XML document) to which it is being compared.Example
In the following case, the document being searched does not match the conditional expression.Conditional Expression
/root/date <= '2006/03/09'Document being searched
<date>2006/3/1</date>
Contents
Index
![]() ![]() |