XML Parsers

Hpricot

( 1 Vote )

A Fast, Enjoyable HTML Parser for Ruby

Hpricot is a very flexible HTML parser, based on Tanaka Akira’s HTree and John Resig’s jQuery, but with the scanner recoded in C. I’ve borrowed (what I believe to be) the best ideas from these wares to make Hpricot heaps of fun to use.

 

 

Nokogiri

( 0 Votes )

Nokogiri  is an HTML, XML, SAX, and Reader parser.

Features:

  • XPath support for document searching
  • CSS3 selector support for document searching
  • XML/HTML builder
  • Drop in replacement for Hpricot (though not bug for bug)

Nokogiri parses and searches XML/HTML very quickly, and also has correctly implemented CSS3 selector support as well as XPath support.