From: Joel Pearson Date: 2013-03-28T01:56:49+09:00 Subject: Re: Nokogiri help parsing HTML How about this? doc = Nokogiri::HTML(@my_text) output = @date_string + $/ doc.xpath('//address/following-sibling::p//text()').each { |line| output << ( line.text.strip + $/ ) } File.write("snippet.txt", output) -- Posted via http://www.ruby-forum.com/.