只保留文本的内容。利用正则表达式就可以很容易做到这一点:
String noHtmlContent = content.replaceAll("<[^>]*>","");
转载于:https://www.cnblogs.com/yanjunwu/p/3539798.html