Home » XPath Operators

XPath Operators


XPath Operators

XPath defines operators and functions on nodes. An XPath expression returns either a node-set, a string, a Boolean, or a number.

A list of operators used in XPath expression:

|It is used to computes two node-sets.
+Addition Operator
Subtraction Operator
*Multiplication Operator
divDivision Operator
=Equal Operator
!=Not Equal Operator
<Less than Operator
<=Less than or Equal to Operator
>Greater than Operator
>=Greater than or Equal to Operator
orOr Operator
andAnd Operator
modModulus (Division Remainder)

Categorization of XPath Operators

XPath operators can be categorized in different category according to their property. Following are the different types of XPath operators:

1)Comparison OperatorsComparison operators are used to compare values.
2)Boolean OperatorsBoolean operators are used to check ‘and’, ‘or’ & ‘not’ functionalities.
3)Number Functions/OperatorsOperators/Functions on Numbers.
4)String FunctionsIt specifies various string functions.
5)Node Functions/OperatorsIt specifies various functions and operators acting on nodes.

You may also like