Nokogiri vs Hpricot?

▼魔方 西西 提交于 2019-12-02 18:08:34
Marc-André Lafortune

Pick Nokogiri, for all points and especially point one: Hpricot is no longer maintained.

Meta answer: See ruby-toolbox to get an idea of the popularity of different tools in a given area.

SztupY

Only pick Hpricot if you don't have, or can't install, LibXML on the computer you're using. If this is not the case then choose Nokogiri, it's better in the five mentioned attributes than Hpricot.

The case where I've found Hpricot to be useful is in dealing with broken HTML that you need to remain broken after processing. Hpricot is good about modifying only the portion of a document you have updated. Unless this is needed, Nokogiri is the way to go.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!