Mark F Mark F - 7 months ago 22
Ruby Question

Nokogiri xpath() 'or' operator?

Is there a way I can accomplish the following using Nokogiri's

xpath()
?

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

Answer

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