Java : HTML Parsing

后端 未结 4 979
一个人的身影
一个人的身影 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:29

    Try NekoHtml. This is the HTML parsing library used by various higher-level testing frameworks such as HtmlUnit.

    NekoHTML is a simple HTML scanner and tag balancer that enables application programmers to parse HTML documents and access the information using standard XML interfaces. The parser can scan HTML files and "fix up" many common mistakes that human (and computer) authors make in writing HTML documents. NekoHTML adds missing parent elements; automatically closes elements with optional end tags; and can handle mismatched inline element tags.

提交回复
热议问题