What HTML parser for Ruby will I find easiest to use if I'm already familiar / in love with jQuery?
Such a parser would have jQuery's overall philosophy -- "grab some HTML elements (using CSS selectors) and do things with them" -- and in addition have equivalents for all of jQuery's DOM manipulation functionality (prepend()
, after()
, etc).
Obviously it wouldn't make sense for a server-side parser to support jQuery event, effect, or AJAX functionality.
Edit: Hpricot does this pretty well (e.g., doc.search('#menu').inner_html
) -- is there anything with a better API? (When I Google "nokogiri v. hpricot" all I get are speed comparisons. I don't care about speed! I just want a library that's fun / easy to use!)