如何使用NSXML解析器從XML中提取屬性?NSXMLParser解析屬性
繼承人我的xml:
<item>
<title>Button hails 'amazing' win</title>
<description>Jenson Button hailed yesterday's crazy Canadian Grand Prix victory as the best of his Formula One career.
</description>
<link>http://www.skysports.com/story/0,19528,12433_6986809,00.html</link>
<guid isPermaLink="false">12433_6986809</guid>
<pubDate>Mon, 13 Jun 2011 06:21:00 GMT</pubDate>
<category>News Story</category>
<enclosure type="image/jpg" url="http://img.skysports.com/11/06/128x67/Canadian-GP-Jenson-Button-celebrates1_2609288.jpg" length="123456" />
</item>
我需要從外殼的標籤獲得的URL。
感謝
+1 ...簡單ñ好的答案.. :)) – mAc 2011-12-13 09:58:32
雅它的很酷的答案.. – 2013-01-28 11:17:59
謝謝你的答案。 我想補充說,這些行應該到'NSXMLParser'的代理方法,它是: ' - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName屬性:(NSDictionary *)attributeDict'。 – Neeku 2013-11-11 15:05:30