views:

157

answers:

2

like DOMDocument class in PHP, is there any class in RUBY (i.e the core RUBY), to parse and get node elements value from a HTML Document.

+2  A: 

You should check out hpricot. It's exceedingly good. It's not 'core' ruby, but it's a commonly used gem.

Peter
+7  A: 

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

Marc-André Lafortune