What HTML parsing libraries do you recommend in Ja

2019-01-05 02:09发布

I want to parse some HTML in order to find the values of some attributes/tags etc.

What HTML parsers do you recommend? Any pros and cons?

3条回答
Explosion°爆炸
2楼-- · 2019-01-05 02:57

NekoHTML, TagSoup, and JTidy will allow you to parse HTML and then process with XML tools, like XPath.

查看更多
Luminary・发光体
3楼-- · 2019-01-05 03:05

Do you need to do a full parse of the HTML? If you're just looking for specific values within the contents (a specific tag/param), then a simple regular expression might be enough, and could very well be faster.

查看更多
唯我独甜
4楼-- · 2019-01-05 03:10

I have tried HTML Parser which is dead simple.

查看更多
登录 后发表回答