2011-11-29 35 views
0

1)我正在Android中製作RSS Feed應用程序。因此,在某些站點中,XML中的描述標記中沒有足夠的數據,但標記中包含該文章的整個數據。那麼如何從鏈接標籤讀取數據。從鏈接標記中讀取數據並獲取多張圖片描述中的網址

http://news.yahoo.com/rss/us

<item> 
<title> 
Police hold off on eviction of Los Angeles Occupy camp 
</title> 
<description> 
<p><a href="http://news.yahoo.com/occupy-la-campers-brace-midnight-eviction-deadline-062954673.html"><img src="http://l2.yimg.com/bt/api/res/1.2/Tjy1MjbTLRHaXzGH5HEznA--/YXBwaWQ9eW5ld3M7Zmk9ZmlsbDtoPTg2O3E9ODU7dz0xMzA-/http://media.zenfs.com/en_us/News/Reuters/2011-11-28T230234Z_1_BTRE7AR1S0D00_RTROPTP_2_USA-PROTESTS.JPG" alt="photo" align="left" title="The Occupy Los Angeles encampment at City Hall Park is seen before the midnight deadline for eviction from City Hall Park passes in Los Angeles" border="0" /></a>LOS ANGELES (Reuters) - Police in riot gear closed in before dawn on Monday on anti-Wall Street activists in Los Angeles who defied a midnight deadline to vacate a camp outside City Hall, but stopped short of clearing the encampment. Police managed to reopen blocked streets for morning rush-hour commuters after a tense standoff with protesters who had taken over a downtown intersection, but remnants of a crowd that had swelled to 2,000 overnight remained at City Hall. ...</p><br clear="all"/> 
</description> 
<link> 
http://news.yahoo.com/occupy-la-campers-brace-midnight-eviction-deadline-062954673.html 
</link> 

在上述連結有整個數據是在鏈接標記。

2)我可以從描述中的src在我的Feed應用程序中顯示一個圖像。但是,我怎樣才能顯示更多的兩個圖像?我的意思是我如何從<description>標記中保存一個圖像鏈接到數組中?

http://feeds.feedburner.com/GameProVideoGameAnalysisNews?format=xml

<description>&lt;p&gt;Projections for 2011 make it look like Nintendo and Sony's handhelds together won't be able to touch the mobile phone market.&lt;/p&gt;&lt;p&gt; 

&lt;div class="inlineImage center" style="width:590px;"&gt; 

&lt;img src="http://cdn1.gamepro.com/article_img/gamepro/51225-224881-1.jpg?rand=D2B74567-BA30-957E-4B59D7FA5F9913FC" alt="Nintendo 3DS Continues To Lose " /&gt; 
&lt;/div&gt; 
&lt;/p&gt;  
&lt;p&gt;It's no secret that mobile phone gaming has seen a meteoric rise over the last few years, but it looks like the software sales trends are finally following suit. The chart above paints a pretty clear picture of Nintendo and Sony's loosening hold on portable game sales, and &lt;a href="http://blog.flurry.com/bid/77424/Is-it-Game-Over-for-Nintendo-DS-and-Sony-PSP"&gt;Flurry Analytics&lt;/a&gt; expects their share to fall to less than 50% by the end of the year.&lt;/p&gt; 
&lt;p&gt;While Sony's fortunes are expected to change somewhat with Vita's release next year, it looks like gamers are sending a pretty clear message on where they want to spend their gaming dollars.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/GameProVideoGameAnalysisNews/~4/hc6MxVcn7T8" height="1" width="1"/&gt;</description> 

我可以閱讀從描述的IMG第一SRC,但我怎麼能讀取描述所有的IMG SRC ..

回答

1

爲此,我已經給出了答案,你可以從那裏檢查並根據您的需要執行它。檢查這 link。希望這會幫助你。