如何从html String中获取Image标签。
我正在接受这样的描述,
<description><![CDATA[<p>23 Mar 2012</p><a href="http://newsonair.nic.in/news.asp?cat=State&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
如果有人知道给我一些想法,
感谢。
答案 0 :(得分:3)
有一百万种方法可以做到,这里有一个:
String url = htmlString.substring(htmlString.lastIndexOf("http"), htmlString.indexOf("jpg")+3);
价: