From: Ted Flethuseo Date: 2011-04-10T21:29:04+09:00 Subject: Re: nokogiri extract text? I do it like this: puts doc.search('p').map { |e| e.text } Pen Ttt wrote in post #920908: > there is a simple file /home/pt/test.html such as the following > > > > > >

> >   
> hallo,world > >  
> >

  > > > > > > i want to extract the text "hallo,world" in the /home/pt/test.html with > nokogiri,how to write? > > require 'rubygems' > require 'nokogiri' > html = '/home/pt/test.html' > doc = Nokogiri::HTML(html) > > would you mind to finish it ? -- Posted via http://www.ruby-forum.com/.