Parsing XHTML using Ruby

Is there any way to parse a remote html page in Ruby, preferably with jQuery like selectors?

For example, I could select all divs that have a specific class and get the contents of all those elements in an array.

I tried to use Regex for this, but I think using XML parsing would be better.

+2


a source to share


1 answer


I found hpricot to be very similar.



+1


a source







All Articles