From: Paul Mena Date: 2013-03-27T23:57:26+09:00 Subject: Re: Nokogiri help parsing HTML Thanks to all for the help. The following seems to do most of what I want: dom.xpath('//address/following-sibling::p//text()').each {|n| p n} My next task is to capture only the desired text, and to write it to a file. Specifically: Line 1\n Line 2\n Line 3\n The above code writes the following to standard out: # # # So close! -- Posted via http://www.ruby-forum.com/.