Chapter 4. XPath 1.0 Functions and Operators

The XPath Boolean Operators and Functions

You can use XPath logical operators to produce Boolean true/false results. These are the logical operators:

  • != means “is not equal to.”

  • < means “is less-than” (use &lt; in XML documents).

  • <= means “is less-than or equal to” (use &lt;= in XML documents).

  • = means “is equal to” (C, C++, Java, and JavaScript programmers take note—this operator is one = sign, not two).

  • > means “is greater-than.”

  • >= means “is greater-than or equal to.”

And as we saw in Chapter 3, you can also use the and ...

Get XPath: Navigating XML with XPath 1.0 and 2.0 Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.