SpringFlowers AutumnMoon wrote:
> by the way
> 
> 
> require 'hpricot'
> 
> doc = Hpricot("<b>hello <i>world</i></b>")
> 
> p doc.search("").inner_text
> 
> 
> won't work... i am not sure if it is the Win installer of Ruby... but it 
> is the most recent Win installer.
> 
> it says
> 
> 
> scraper2.rb:6: undefined method `inner_text' for 
> #<Hpricot::Elements:0x348dbc4>
> (NoMethodError)
> 
> and doc.to_plain_text()   won't work either...
> 

$ uname -s
CYGWIN_NT-5.1
$ gem list hpricot

*** LOCAL GEMS ***

hpricot (0.6, 0.5)
    a swift, liberal HTML parser with a fantastic library
$ irb
irb(main):001:0> require 'hpricot'
=> true
irb(main):002:0> d = Hpricot("<b>hello <i>world</i></b>")
=> #<Hpricot::Doc {elem <b> "hello " {elem <i> "world" </i>} </b>}>
irb(main):003:0> d.inner_text
=> "hello world"

-------------------------------------------------------------------

C:\>systeminfo
...
OS Name:                   Microsoft Windows XP Professional
OS Version:                5.1.2600 Service Pack 2 Build 2600
...
C:\>gem list hpricot

*** LOCAL GEMS ***

hpricot (0.6, 0.5, 0.4)
    a swift, liberal HTML parser with a fantastic library

C:\>irb
irb(main):001:0> require 'hpricot'
=> true
irb(main):002:0> d = Hpricot("<b>hello <i>world</i></b>")
=> #<Hpricot::Doc {elem <b> "hello " {elem <i> "world" </i>} </b>}>
irb(main):003:0> d.inner_text
=> "hello world"

mortee