XPath Operators

A node-set, a string, a Boolean, or a number is returned by an XPath expression. The operators that we can use in XPath expressions are listed below:

Operator Example Description
| //book | //cd Computes two node-sets
+ 11 + 22 Addition
22 – 11 Subtraction
* 11 * 22 Multiplication
div 22 div 11 Division
= price=11.00 Equal
!= price!=11.00 Not equal
< price<11.00 Less than
<= price<=11.00 Less than or equal to
> price>11.00 Greater than
>= price>=11.00 Greater than or equal to
or price=11.00 or price=22.00 or
and price>11.00 and price<22.00 and
mod 22 mod 10 Modulus (division remainder)
Please Share