Here you can find the source of HtmlToText(String str)
public static String HtmlToText(String str)
//package com.java2s; public class Main { public static String HtmlToText(String str) { str = str.replace("<br />", "\n"); str = str.replace("<br/>", "\n"); str = str.replace(" ", "\t"); str = str.replace(" ", " "); str = str.replace("'", "\\"); str = str.replace(""", "\\"); str = str.replace(">", ">"); str = str.replace("<", "<"); str = str.replace("&", "&"); return str; }/*from w ww . jav a 2s .com*/ }