iPhone 上使用 GData 解析 ATOM 数据
我正在尝试从 RSS 提要中解析 XML。
它包含 ATOM 数据,我想使用 GData 库解析它。
XML 代码如下所示:
<item>
<title>Madoka Kaname</title>
<link>http://emperpep.deviantart.com/art/Madoka-Kaname-200775806</link>
<guid isPermaLink="true">http://emperpep.deviantart.com/art/Madoka-Kaname-200775806</guid>
<pubDate>Sun, 13 Mar 2011 05:36:08 PDT</pubDate>
<media:title type="plain">Madoka Kaname</media:title>
<media:keywords></media:keywords>
<media:rating>nonadult</media:rating>
<media:category label="Paintings">manga/digital/paintings</media:category>
<media:credit role="author" scheme="urn:ebu">emperpep</media:credit>
<media:credit role="author" scheme="urn:ebu">http://a.deviantart.net/avatars/e/m/emperpep.jpg</media:credit>
<media:copyright url="http://emperpep.deviantart.com">Copyright 2011 *emperpep</media:copyright>
<media:thumbnail url="http://th08.deviantart.net/fs70/300W/f/2011/072/a/9/madoka_kaname_by_emperpep-d3bjblq.jpg" height="389" width="300"/>
<media:thumbnail url="http://th09.deviantart.net/fs70/150/f/2011/072/a/9/madoka_kaname_by_emperpep-d3bjblq.jpg" height="150" width="116"/>
<media:content url="http://fc05.deviantart.net/fs70/f/2011/072/a/9/madoka_kaname_by_emperpep-d3bjblq.jpg" height="988" width="761" medium="image"/>
<media:content url="http://www.deviantart.com/download/200775806/" medium="document"/>
<description><![CDATA[ Digital Painting : Madoka KanamePicture of Madoka Kaname , made for an Anime convention.Tools:Sai 1.1.0 Photoshop CSWacom Intuos 3Macbook ProTime: 3 daysCharacters from Puella Magi Madoka Magica [...<br /><div><img src="http://th08.deviantart.net/fs70/300W/f/2011/072/a/9/madoka_kaname_by_emperpep-d3bjblq.jpg" alt="thumbnail" /></div> ]]></description>
<media:description type="html"><![CDATA[ Digital Painting : Madoka KanamePicture of Madoka Kaname , made for an Anime convention.Tools:Sai 1.1.0 Photoshop CSWacom Intuos 3Macbook ProTime: 3 daysCharacters from Puella Magi Madoka Magica [... ]]></media:description>
</item>
我不知道如何获取 media:content 字段中包含的数据。谁能帮我解决这个问题吗?
I am trying to parse XML from an RSS feed.
It contains ATOM data and I would like to parse it using GData library.
The XML code looks like this:
<item>
<title>Madoka Kaname</title>
<link>http://emperpep.deviantart.com/art/Madoka-Kaname-200775806</link>
<guid isPermaLink="true">http://emperpep.deviantart.com/art/Madoka-Kaname-200775806</guid>
<pubDate>Sun, 13 Mar 2011 05:36:08 PDT</pubDate>
<media:title type="plain">Madoka Kaname</media:title>
<media:keywords></media:keywords>
<media:rating>nonadult</media:rating>
<media:category label="Paintings">manga/digital/paintings</media:category>
<media:credit role="author" scheme="urn:ebu">emperpep</media:credit>
<media:credit role="author" scheme="urn:ebu">http://a.deviantart.net/avatars/e/m/emperpep.jpg</media:credit>
<media:copyright url="http://emperpep.deviantart.com">Copyright 2011 *emperpep</media:copyright>
<media:thumbnail url="http://th08.deviantart.net/fs70/300W/f/2011/072/a/9/madoka_kaname_by_emperpep-d3bjblq.jpg" height="389" width="300"/>
<media:thumbnail url="http://th09.deviantart.net/fs70/150/f/2011/072/a/9/madoka_kaname_by_emperpep-d3bjblq.jpg" height="150" width="116"/>
<media:content url="http://fc05.deviantart.net/fs70/f/2011/072/a/9/madoka_kaname_by_emperpep-d3bjblq.jpg" height="988" width="761" medium="image"/>
<media:content url="http://www.deviantart.com/download/200775806/" medium="document"/>
<description><![CDATA[ Digital Painting : Madoka KanamePicture of Madoka Kaname , made for an Anime convention.Tools:Sai 1.1.0 Photoshop CSWacom Intuos 3Macbook ProTime: 3 daysCharacters from Puella Magi Madoka Magica [...<br /><div><img src="http://th08.deviantart.net/fs70/300W/f/2011/072/a/9/madoka_kaname_by_emperpep-d3bjblq.jpg" alt="thumbnail" /></div> ]]></description>
<media:description type="html"><![CDATA[ Digital Painting : Madoka KanamePicture of Madoka Kaname , made for an Anime convention.Tools:Sai 1.1.0 Photoshop CSWacom Intuos 3Macbook ProTime: 3 daysCharacters from Puella Magi Madoka Magica [... ]]></media:description>
</item>
I don't have any idea how to get the data contained in the media:content field. Can anyone help me with this one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了答案。这是代码:
I found the answer. Here is the code: