|
Home >Online Product Documentation >Table of Contents >Comparing Single Values With <=, <, >, and >= Comparing Single Values With <=, <, >, and >=When neither object to be compared is a node set and the operator is <=, <, >=, or >, the XPath processor performs the comparison by converting both objects to numbers and comparing the numbers according to IEEE 754. The XPath processor always evaluates these comparisons in terms of numbers. You cannot use the less than and greater than operators to order strings. This is especially important to remember when you compare a number with a string. For example, suppose you want to evaluate the expression The return value is always false. This is because number("foo") returns NaN, and the resulting comparison, shown below, is always false. |