TagSoup vs. Jsoup vs. HTML Parser vs. HotSax vs [closed]

别来无恙 提交于 2019-12-17 22:09:26

问题


The abundance of HTML parsers to choose from (and stick with) is mind boggling:

http://java-source.net/open-source/html-parsers

How do I choose one that best suits the following requirements:

  1. Mature (fewer bugs than the rest)
  2. Live and breathing (i.e. being maintained)
  3. Fast and resource-efficient (intended to run on Android)

Based on your experience, which HTML parser would you recommend (for meeting the above requirements) and why?


回答1:


Well, I found the answer, which was given by @BalusC on a different thread:

  1. If you just want to use a XML based tool to traverse it: JTidy.
  2. If you like to unit test the HTML: HtmlUnit
  3. If you like to extract specific data from the HTML: Jsoup

Thank you @BalusC.



来源:https://stackoverflow.com/questions/5183748/tagsoup-vs-jsoup-vs-html-parser-vs-hotsax-vs

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