There are two ways of comparing values are available in XQuery.
1. General comparisons: =, !=, >, >=, <, <=
2. Value comparisons: eq, ne, gt, ge,lt,le,
The difference between the two comparison methods are given below.
Look at the XQuery expressions which is given below:
$bookstore//book/@q > 10
The expression above returns true if any q attributes
have values greater than 10.
$bookstore//book/@q gt 10
The expression above returns true if there is only one
q attribute returned by the expression, and its value
is greater than 10. If more than one q is returned,
an error occurs.