我怎样才能获得html图片标签android?

时间:2012-03-23 18:25:32

标签: android html image hyperlink

如何从html String中获取Image标签。

我正在接受这样的描述,

  <description><![CDATA[<p>23&nbsp;Mar&nbsp;2012</p><a href="http://newsonair.nic.in/news.asp?cat=State&amp;id=ST9197"><p style='FONT-SIZE: 12px; LINE-HEIGHT: 150%' align='justify'> <img style='FLOAT: left; MARGIN-RIGHT: 5px' height='80' width='80' src=http://www.newsonair.nic.in/writereaddata/news_pictures/PICST9197.jpg?0.533424></a><br> The West Bengal Budget for 2012-13 proposes an additional taxation of 200 crore rupees.The budget placed in the State Assembly by the Finance Minister Dr.</p><br clear="all" />]]></description>

我想单独使用此链接:

http://www.newsonair.nic.in/writereaddata/news_pictures/PICST9197.jpg

如果有人知道给我一些想法,

感谢。

1 个答案:

答案 0 :(得分:3)

有一百万种方法可以做到,这里有一个:

 String url = htmlString.substring(htmlString.lastIndexOf("http"), htmlString.indexOf("jpg")+3);

价:

String API