viraptor
viraptor

Reputation: 34145

XPath boolean 'or'

I'd like to select a node if it has class="something" or class="else". How can I do that? XPath docs don't seem to contain any easy to find boolean or equivalent.

Upvotes: 1

Views: 1202

Answers (2)

Dimitre Novatchev
Dimitre Novatchev

Reputation: 243449

It is just or -- not OR or Or.

XPath is case sensitive -- don't forget.

Upvotes: 1

Ken Bloom
Ken Bloom

Reputation: 58770

The or operateor is named or and you would use it like //div[@class='something' or @class='else']

Upvotes: 5

Related Questions