Is there a way that I can accomplish the following using Nokogiri xpath() ?
xpath()
doc.xpath("//pod[@id=or('anid','anotherid')]")
Try doc.xpath("//pod[@id='anid' or @id='anotherid']")
doc.xpath("//pod[@id='anid' or @id='anotherid']")
Try this XPath:
It also helped me:
sect_pr.xpath("//pod[@id='anid']", "//pod[@id='anotherid']")
It returns a NodeSet
NodeSet
I got code like this:
sect_pr.xpath('//w:headerReference or //w:footerReference')
And it returns true insted NodeSet
true
Source: https://habr.com/ru/post/903799/More articles:mycout automatic endl - c ++Is there a CSS equivalent for XIB (Xcode Interface Builder XML)? - cssHow to initiate form submission when loading a page using jQuery - jqueryjQuery nested templates - jqueryIs there a side effect of clearing the cache when creating a new thread? - javastored procedures calling data in another schema - sql-serverAndroid MediaPlayer stuck in preparation mode () - androidPerl IDE standard input not working - perlgit basic setup - gitboost :: python :: list length - c ++All Articles