如何在抓取时避免连接节点中的所有文本
require 'nokogiri'doc = Nokogiri::HTML(<<EOT)<html> <body> <p>foo</p> <p>bar</p> <p>baz</p> </body></html>EOT doc.search('p').text # => "foobarbaz"
["foo", "bar", "baz"]
doc = Nokogiri::XML(<<EOT)<root> <block> <entries>foo</entries> <entries>bar</entries> <entries>baz</entries> </block></root>EOT doc.search('entries').text # => "foobarbaz"