i just want the text out of there with out those tags. Does Hrpicot.XML have any methods for this?
use element.inner_text instead of #inner_html and it removes them for you
doc.search("*") do |element|
element.swap element.content if element.kind_of? Hpricot::CData
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With