apache.commons工具例子
import org.apache.commons.lang.StringEscapeUtils;
/**
* html 转义。有时也会失败
* @author aircoder
*
*/
public class RanferHtml {
public static void main(String[] args) {
String str = "四川"恐龙草"南半球找到"亲戚" 证实大陆漂移说";
str = StringEscapeUtils.unescapeHtml(str);
System.out.println(str);
}
}
猜你喜欢
转载自aircoder.iteye.com/blog/1740668
今日推荐
周排行