📜  XPath运算符

📅  最后修改于: 2020-12-26 06:59:10             🧑  作者: Mango

XPath运算子

XPath在节点上定义运算符和函数。 XPath表达式返回节点集,字符串,布尔值或数字。

XPath表达式中使用的运算符列表:

Operator Description
| It is used to computes two node-sets.
+ Addition Operator
Subtraction Operator
* Multiplication Operator
div Division Operator
= Equal Operator
!= Not Equal Operator
< Less than Operator
<= Less than or Equal to Operator
> Greater than Operator
>= Greater than or Equal to Operator
or Or Operator
and And Operator
mod Modulus (Division Remainder)

XPath运算符的分类

XPath运算符可以根据其属性分为不同的类别。以下是不同类型的XPath运算符:

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