*72*

# 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:

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) |

## Categorization of XPath Operators

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

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. |

Next TopicXPath Comparison Operators