我是Android新手。你能帮我解析一下这个包含HTML内容的XML,比如
<title>Jeff Mayweather: Floyd Sr showed a Sign of finally letting go of his Son, Passing Torch to Roger</title>
<summary type="html">
<p>By Shawn Craddick</p><p></p>
<p>Boxingsocialist had a chance to catch up with Floyd Mayweather's other uncle Jeff Mayweather. While Jeff stays busy at the gym he gave us some updates on his fighters as well as his thoughts on Brandon Rios, Gamboa, Floyd Mayweather Sr and Floyd Jr. meeting back together. Also he talked to us about a surprise boxing veteran he might be working with. Check out the interview below.</p>
<p><br></br> <span style="color: #ff6600;">BoxingSocialist</span>- What did you…</p> </summary>
我可以解析 title 字段,为解析摘要字段,我在RSS处理程序中给出命令 - localname.equals(“summary”)< / strong>。我无法解析摘要字段中的内容。有谁帮我这个?
答案 0 :(得分:0)
答案 1 :(得分:0)
尝试这个
android.text.Html.fromHtml(text).toString();
答案 2 :(得分:0)
一旦我在标签内部有html数据这样的Feed。我的解决方案是要求数据提供者用CDATA
包装html。因此,如果您可以访问如何创建xml,请考虑此选项。