Home » XPath Boolean Operators

XPath Boolean Operators

by Online Tutorials Library

XPath Boolean Operators

A list of Boolean operators used in XPath expression.

Index Operator Description
1) and It specifies that both conditions must be satisfied.
2) or It specifies that any one of the condition must be satisfied.
3) not() It specifies function to check condition not to be satisfied.

XPath Boolean Operator Example

Let’s take an example to create a table of element with its attribute id and its child <firstname>,<lastname> <nickname> and <salary> . In this example, it checks id to be either 001 or 003 and then prints the details.

Employee.xml

Employee.xsl

Output:

XPATH Boolean operators 1

You may also like