Filter expressions are meant for applying to collections. You can add filter expressions at any part of the XPath expression. Filters are applied relative to their context. They also have its own set of operators.
The logical and operator evaluates both sides of operands and returns true if and only if all of its operands are true.
//tr[@class="odd" and @style]
The logical or operator evaluates both sides of operands and returns true if one of its operand is true.
//tr[@class="odd" or @class="even"]
The not operator negates the expression.
The equality operator checks that both operands are equal in value.
The inequality operator checks that both operands are not equal in value.
The less than and greater than operators checks that the values of both operands are less than or greater than one another.
The union operator returns the union of two sets of nodes. It is usually used for combining results from multiple expressions.
//td[.="Bravo"] | //td[.="Charlie"]