开发者

Parse XHTML using Ruby

开发者 https://www.devze.com 2022-12-28 03:15 出处:网络
Is there any way I can parse a remote html page, in Ruby, preferably using jQuery like selectors? For example, I could select all the div having a specific class, and get the content of all those ele

Is there any way I can parse a remote html page, in Ruby, preferably using jQuery like selectors?

For example, I could select all the div having a specific class, and get the content of all those elements in an array.

I was trying to use Regex for this, but I think using XML parser开发者_开发百科 would be better.


I found hpricot is very similar.

0

精彩评论

暂无评论...
验证码 换一张
取 消