Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nokogiri xpath() 'or' operator?

Is there a way I can accomplish the following using Nokogiri's xpath() ?

doc.xpath("//pod[@id=or('anid','anotherid')]")
like image 849
Mark Avatar asked Dec 14 '11 20:12

Mark


2 Answers

Try doc.xpath("//pod[@id='anid' or @id='anotherid']")

like image 198
jasso Avatar answered Nov 15 '22 07:11

jasso


Try this XPath:

doc.xpath("//pod[@id='anid' or @id='anotherid']")
like image 28
maerics Avatar answered Nov 15 '22 06:11

maerics