H
henryturnerlists
Hey,
Trying to find the String index of an Hpricot::Elem within its doc.
For example..
doc = Hpricot("<a>bob</a><a>james</a><a>dan</a>")
elem = doc.search("a")[1]
elem.start #=> 10 ( the first '<' of the second a tag.)
and eventually the following would be good..
elem.length #=> 12
elem.end #=> 21
Any thoughts appreciated!
Henners
Trying to find the String index of an Hpricot::Elem within its doc.
For example..
doc = Hpricot("<a>bob</a><a>james</a><a>dan</a>")
elem = doc.search("a")[1]
elem.start #=> 10 ( the first '<' of the second a tag.)
and eventually the following would be good..
elem.length #=> 12
elem.end #=> 21
Any thoughts appreciated!
Henners