syndication-item

Get media elements from RSS using SyndicationFeed

∥☆過路亽.° 提交于 2020-01-06 08:23:07
问题 I'm attempting to parse an RSS feed using C# and the SyndicationFeed class. I'm iterating over the items to get a list of SyndicationItems and that is exposing most of the feed properties, but what I cannot get out is the media:thumbnail element: <?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"

Reading non-standard elements in a SyndicationItem with SyndicationFeed

a 夏天 提交于 2019-12-17 10:17:01
问题 With .net 3.5, there is a SyndicationFeed that will load in a RSS feed and allow you to run LINQ on it. Here is an example of the RSS that I am loading: <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

SyndicationItem.Content is Null

巧了我就是萌 提交于 2019-12-05 13:38:27
问题 I'm trying to pull the contents of an RSS feed into an object that can be manipulated in code. It looks like the SyndicationFeed and SyndicationItem classes in .NET 3.5 will do what I need, except for one thing. Every time I've tried to read in the contents of an RSS feed using the SyndicationFeed class, the .Content element for each SyndicationItem is null. I've run my feed through FeedValidator and have tried this with feeds from several other sources, but to no avail. XmlReader xr =

SyndicationFeed: Content as CDATA?

那年仲夏 提交于 2019-12-01 06:19:41
I'm using .NET's SyndicationFeed to create RSS and ATOM feeds. Unfortunately, I need HTML content in the description element (the Content property of the SyndicationItem) and the formatter automatically encodes the HTML, but I'd rather have the entire description element wrapped in CDATA without encoding the HTML. My (simple) code: var feed = new SyndicationFeed("Title", "Description", new Uri("http://someuri.com")); var items = new List<SyndicationItem>(); var item = new SyndicationItem("Item Title", (string)null, new Uri("http://someitemuri.com")); item.Content = SyndicationContent

SyndicationFeed: Content as CDATA?

谁说胖子不能爱 提交于 2019-12-01 04:48:27
问题 I'm using .NET's SyndicationFeed to create RSS and ATOM feeds. Unfortunately, I need HTML content in the description element (the Content property of the SyndicationItem) and the formatter automatically encodes the HTML, but I'd rather have the entire description element wrapped in CDATA without encoding the HTML. My (simple) code: var feed = new SyndicationFeed("Title", "Description", new Uri("http://someuri.com")); var items = new List<SyndicationItem>(); var item = new SyndicationItem(

Reading non-standard elements in a SyndicationItem with SyndicationFeed

点点圈 提交于 2019-11-27 10:57:00
With .net 3.5, there is a SyndicationFeed that will load in a RSS feed and allow you to run LINQ on it. Here is an example of the RSS that I am loading: <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