How does one remove tags from around text in XML using Hpricot?

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.

Doc = Hpricot::XML(open('cnn.com/.element/ssi/www/auto/2.0/video/...)) (doc/:cnn_video/:video). Each do |status| 'tease_txt'. Each do |el| puts "#{status.At(el).

Inner_text}" end end Example output (looks spammy but this is not spam! ): New Reno air crash video shows impact Teen catches 800-pound gator Resuming careers post 'don't ask' repeal Creepy skirt peepers Bus-sized satellite to hit Earth thi ... 'DWTS' cast hits ballroom for first time What caused trainer's death at SeaWorld? What led to Troy Davis clemency denial?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions