TagSoup vs. Jsoup vs. HTML Parser vs. HotSax vs [closed]
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:
- Mature (fewer bugs than the rest)
- Live and breathing (i.开发者_JAVA百科e. being maintained)
- 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?
Well, I found the answer, which was given by @BalusC on a different thread:
- If you just want to use a XML based tool to traverse it: JTidy.
- If you like to unit test the HTML: HtmlUnit
- If you like to extract specific data from the HTML: Jsoup
Thank you @BalusC.
精彩评论