The collection of network information recently is essential for parsing HTML. I have checked a lot of tools in this area, but I don't know which one is useful. It seems that htmlparser uses multiple points, but it has not been updated since. It is probably enough to parse HTML 4. It has collected several seemingly good ones and kept them for backup.
Java Mozilla HTML Parser
Parses HTML into a Java Document Object. It is an HTML parsing class library encapsulated by the Mozilla HTML Parser. Therefore, it can provide developers with a browser-quality HTML Parser.
Address: http://mozillaparser.sourceforge.net/
Htmlcleaner
Is an open-source HTML document parser. Htmlcleaner can re-Sort each element and then generate well-structured XML documents. The default rule is similar to the one used by most Web browsers to create document object models. However, you can provide custom tags and rule groups for filtering and matching.
Address: http://htmlcleaner.sourceforge.net/
HTML Parser
Address: http://htmlparser.sourceforge.net/
Jsoup
Is a Java HTML Parser that can directly parse a URL address and HTML text content. It is much easier and lighter than the previously used htmlparser.
Address: http://jsoup.org/
-------------------------------------------------------------------------
In addition, some articles such as jsoup, such as http://www.oschina.net/p/jsoup, can be found in open source China.
This article is published in Chrysanthemum