问题:上传一个富文本的笔记,在记录里面查看列表项需要显示一个概要,但是服务器端获取
的是一个h5串,那就需要把里面的文字解析出来。
一、添加依赖
dependencies { compile 'org.jsoup:jsoup:1.9.2' }
二、解析
Document doc = Jsoup.parse("需要转化的string");
String txt = doc.body().text();
dependencies { compile 'org.jsoup:jsoup:1.9.2' }
Document doc = Jsoup.parse("需要转化的string");
String txt = doc.body().text();