hi,
I’ve been using ruby for a few weeks and been messing with DOM-like
programming
using hpricot.
I’m looking for an efficient (rubyiish) way to find the set of Node
Elements
that have a text_element child containing a given string
for instance given the html code
harr is a dog | fuu is a cat | jii is a dog |
I would like to set this query
getNodesContaining(“dog”)
that would return an Array with the xpath of the first and third td
(since they
contain the text dog)
thanks in advance
Sylvain