Convert HTML to plain text in Java

前端 未结 6 2580
终归单人心
终归单人心 2021-02-20 08:51

I need to convert HTML to plain text. My only requirement of formatting is to retain new lines in the plain text. New lines should be displayed not only in the case of <

6条回答
  •  梦毁少年i
    2021-02-20 09:17

    I would use SAX. If your document is not well-formed XHTML, I would transform it with JTidy.

提交回复
热议问题