From: Sylvain Tenier Date: 2006-12-19T12:24:34+09:00 Subject: find all possible container nodes of a given text 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 dogfuu is a catjii 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 -- Rien ne peut jamais marcher si l'on songe � tout ce qu'il faut pour que �a marche. -- Daniel Pennac