From: Love U Ruby Date: 2013-04-15T02:20:46+09:00 Subject: Re: Why does #content method in nokogiri not printing the full text? tamouse mailing lists wrote in post #1105601: > On Sun, Apr 14, 2013 at 11:19 AM, Love U Ruby > > (load your code into irb) > require 'pp' > pp doc > > and see what the structure is. Now, I tried doc = Nokogiri::HTML::DocumentFragment.parse(html) pp doc doc.children.each do |ch| p ch.content if ch.text? end output: ======= children = [ #(Text "\n\n Rough wind, that moanest loud\n Grief too sad for song;\n Wild wind, when sullen cloud\n Knells all the night long;\n Sad storm, whose tears are vain,\n Bare woods, whose branches strain,\n Deep caves and dreary main, -\n Wail, for the world's wrong!\n\n ")] }), #(Text "\n\n ") -- "\n\n \n\n " "\n\n " where does go the middle characters between the first "\n\n \n\n " ? -- Posted via http://www.ruby-forum.com/.