From: Luis Parravicini Date: 2010-06-23T20:15:52+09:00 Subject: Re: nokogiri extract text? On Wed, Jun 23, 2010 at 12:23 AM, Pen Ttt wrote: > 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 ? At http://wiki.github.com/tenderlove/nokogiri/ you can read on how to find the nodes you need. I think you'll need to use xpath. Bye -- Luis Parravicini http://ktulu.com.ar/blog/