Forum: Ruby on Rails How to parse HTML doc in Ruby?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Karika (Guest)
on 2006-02-13 15:01
Hi,

I want to parse the html doc using ruby.
I tried using reXML but failed to load html doc as it is not in well
formed structure.
Can you please suggest me a good parser which I can use to parse HTML
page using Ruby?

Thanks,
Karika.
Michael J. (Guest)
on 2006-02-14 00:53
(Received via mailing list)
Phillip Bogle (Guest)
on 2006-02-14 01:35
Karika wrote:
> Hi,
>
> I want to parse the html doc using ruby.
> I tried using reXML but failed to load html doc as it is not in well
> formed structure.
> Can you please suggest me a good parser which I can use to parse HTML
> page using Ruby?
>
> Thanks,
> Karika.

I've had good luck with Rubyful Soup:

http://www.crummy.com/software/RubyfulSoup/
This topic is locked and can not be replied to.