Java : HTML Parsing

后端 未结 4 951
一个人的身影
一个人的身影 2020-12-22 05:23

I am having HTML contents as given below. The tag that i am looking out for here are \"img src\" and \"!important\". Does Java provide any HTML par

4条回答
  •  隐瞒了意图╮
    2020-12-22 05:44

    I like using Jericho: http://jericho.htmlparser.net/docs/index.html

    It is invulnerable to bad formed html, links leading to unavailable locations etc.

    There's a lot of examples on their page, you just get all IMG tags and analyze their attributes to extracts those that pass your needs.

提交回复
热议问题