从XML标签提取并加载图像

问题描述 投票:0回答:1

我正在使用XmlPullParser解析xml文件,我成功加载了所有其他标签,但是我想知道如何从此标签和描述行中提取图像,如下所示

图像

img border='0' 
 src='https://www.eyefootball.com/imghold/thumbChristianEriksen_2019.jpg'>

也是此行

<BR>Christian Eriksen has reportedly made the decision to leave Tottenham 
 Hotspur in the New Year after declining to sign a new contract.</p>

这是包含两者的整个标签

 <description><![CDATA[<p><A 
 HREF='https://www.eyefootball.com/news/42653/Christian-Eriksen-Tottenham- 
 Hotspur-transfer-decision.html'><img border='0' 
 src='https://www.eyefootball.com/imghold/thumbChristianEriksen_2019.jpg'></A> 
 <BR>Christian Eriksen has reportedly made the decision to leave Tottenham 
 Hotspur in the New Year after declining to sign a new contract.</p>]]> </description>

谢谢

android xmlpullparser
1个回答
0
投票
好,首先像完成here]那样提取标签

然后您可以使用Picasso从url或文件中加载图像。检查this answer

© www.soinside.com 2019 - 2024. All rights reserved.