Hpricot borrows design inspiration from jResig's jQuery, which is designed to change the way you write JavaScript. As such, the jQuery website and tutorials might help you get an idea of why Hpricot differs from your good ol' xML parsing lib.
If you'd like a more detailed introduction, here are a few links to help you get started!
- Scraping gmail with mechanize and Hpricot
- Parse XML with Hpricot
- del.icio.us-ly bookmarks on Hpricot
- Ruby screen scraper in 60 seconds
- We heart code: scraping IMDB
- AnHpricotShowcase -- see what using Hpricot is like.
Got any good tutorials? Send them along to the Hpricot mailing list or, as they say on Wikipedia, edit this page!
Are you a Java (JRuby) hacker? You can use Hpricot too! JRuby and Hpricot goodness.
As you start diving into Hpricot, having a good knowledge of CSS selectors (and to a lesser extent, XPath) will make your life that much more fun. The jQuery selector documentation is a good place to start learning about CSS/XPath selectors and why they make DOM selection that much easier.
Want to get even better at HpricotFu? If you've read some tutorials, picked up enough selector fu and Ruby syntax along the way, then Firebug will be your friend. Firebug's inspector makes it that much easier to identify the appropriate selectors for an element you see on a page, even if you'll need to tweak the XPaths or CSS selectors that Firebug or XPanther, for example, might give you.
And, if you wait long enough, you might find that someone has gone through and extended Firebug or XRay to play nice with Hpricot. nudge hint hoodwink!
