Tag: syndication feed

使用SyndicationFeed读取SyndicationItem中的非标准元素

在.net 3.5中,有一个SyndicationFeed,它将加载一个RSS提要,并允许你运行LINQ。 这里是我正在加载的RSS的一个例子: <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Title of RSS feed</title> <link>http://www.google.com</link> <description>Details about the feed</description> <pubDate>Mon, 24 Nov 08 21:44:21 -0500</pubDate> <language>en</language> <item> <title>Article 1</title> <description><![CDATA[How to use StackOverflow.com]]></description> <link>http://youtube.com/?v=y6_-cLWwEU0</link> <media:player url="http://youtube.com/?v=y6_-cLWwEU0" /> <media:thumbnail url="http://img.youtube.com/vi/y6_-cLWwEU0/default.jpg" width="120" height="90" /> <media:title>Jared on StackOverflow</media:title> <media:category label="Tags">tag1, tag2</media:category> <media:credit>Jared</media:credit> <enclosure url="http://youtube.com/v/y6_-cLWwEU0.swf" length="233" type="application/x-shockwave-flash"/> </item> </channel> 当我遍历项目时,我可以通过SyndicationItem的公共属性找回标题和链接。 我似乎无法弄清楚如何获得机箱标签的属性或媒体标签的值。 我试过使用 […]