From: bbiker Date: 2007-02-02T01:40:06+09:00 Subject: Re: hpricot 0.5 -- a fast, forgiving HTML reader On Jan 31, 10:33 pm, _why wrote: > Hi, here's Hpricot 0.5. > > gem install hpricot --sourcehttp://code.whytheluckystiff.net > > Hpricot reads HTML pages and works hard to fix them up and give you > everything you need to wind your way around them and hack them up! > Inspired by John Resig's JQuery and Tanaka Akira's HTree. > > * Hpricot is standalone. It's dependant on no other libs, just > Ruby. > * Hpricot is fast, its parser is written in C with help of the > wonderful Ragel state machine compiler. > * However, Hpricot also works hard to fix up HTML and pays a small > penalty to get it right. > * How hard does Hpricot work? My rule is: if Firefox parses it, > Hpricot should too. > > This release has a number of really nice features. The new > `to_original_html` method will try to preserve as much of the > original HTML as possible (including its mistakes) while still > merging in your changes. Also, you can test text nodes with syntax > like: `//a[text()='Click Me!']`. > > Should appear on Rubyforge soon enough. Thank you to all the > ticketeers and patchistadores out there, especially Leslie Wu who's > been punching that commit button like she's doin the turtle trap!! > > _why just downloaded hpricot ... no warnings when I run my script. however, the Rdoc flag is still turned off .. documentation please!!! C:\..\Owner>gem query -n hpricot -r -s http:// code.whytheluckystiff.net" *** REMOTE GEMS *** Need to update 2 gems from http://code.whytheluckystiff.net .. complete hpricot (0.5, 0.4.99, 0.4.92, 0.4.90, 0.4.86, 0.4.76, 0.4.59, 0.4.52, 0.4.47, 0.4.43, 0.4, 0.3.32, 0.3, 0.2, 0.1) a swift, liberal HTML parser with a fantastic library C:\..\Owner>gem install hpricot --source http:// code.whytheluckystiff.net Select which gem to install for your platform (i386-mswin32) 1. hpricot 0.5 (ruby) 2. hpricot 0.5 (mswin32) 3. hpricot 0.5 (ruby) 4. hpricot 0.5 (mswin32) 5. Skip this gem 6. Cancel installation > 2 Successfully installed hpricot-0.5-mswin32 C:\Documents and Settings\Owner> RubyGems Documentation Index hpricot 0.4 [rdoc] [www] a swift, liberal HTML parser with a fantastic library hpricot 0.4.99 [rdoc] [www] a swift, liberal HTML parser with a fantastic library hpricot 0.5 [rdoc] [www] a swift, liberal HTML parser with a fantastic library in all of the listing, only "www" has an active link.