why the lucky stiff wrote:
> 
> So, in Hpricot:
> 
>   doc = Hpricot("<html>...</html>")
>   doc.search("foo").each do |ele|
>     new_ele = Hpricot \
>       '<p>I found a ' + ele.name + " tag enclosing \'" +
>       ele.inner_html + "' with " + ele.attributes.keys.join(' and ') +
>       " values of " + ele.attributes.values.map { |x| "'#{x}'" }.join(' and ') +
>       "...</p>"
>     ele.parent.replace_child(ele, new_ele.children.first)
>   end
>   puts doc
> 
> REXML has a replace_child as well.  But now you've motivated me to add Element#replace.

Hmm, the right thing to do and a tasty way to do it.

This motivates me to download Hpricot for the first time
and try it. Probably tomorrow as my brane is fride.


Thanks,
Hal