【发布时间】:2017-02-07 11:27:16
【问题描述】:
早上好,例如,你怎么能从这个 xml 项(描述)中只获取 txt?
<description><![CDATA[<b>
<font color="#000000">hello world...</font>
</b>]]></description>
我现在的代码是
if (cureent.getNodeName().equalsIgnoreCase("description")){
item.setDescription(cureent.getTextContent());
打印的结果是:
<![CDATA[<b><font color="#000000">hello world...</font></b>]]>
这就是我需要打印的内容:
hello world...
谢谢大家
【问题讨论】: