【发布时间】:2013-02-10 10:14:50
【问题描述】:
我有一个输入 String 包含一些 HTML 片段,如下例所示
I would have enever thought that <b>those infamous tags</b>,
born in the <abbr title="Don't like that acronym">SGML</abbr> realm,
would make their way into the web of objects that we now experience.
显然,真实的要复杂得多(包括链接、图像、div 等),我想编写一个具有以下原型的方法
String toXHTML(String html) {
// What do I have to write here ?
}
【问题讨论】: