Method to parse HTML document in Ruby?

There is no built-in HTML parser (yet), but some very good ones are available, in particular Nokogiri.

Meta-answer: For common needs like these, I’d recommend checking out the Ruby Toolbox site. You’ll notice that Nokogiri is the top recommendation for HTML parsers

Leave a Comment