Use Nokogiri's XPath selectors for fastest speed - CSS-based search is faster than Hpricot but not as fast. Also take note that this benchmark is only shows parsing of XML (not HTML).