SyndicationItem.Content is Null
- by kdmurray
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 = XmlReader.Create("http://shortordercode.com/feed/");
SyndicationFeed feed = SyndicationFeed.Load(xr);
foreach (SyndicationItem item in feed.Items)
{
Console.WriteLine(item.Title.Text);
Console.WriteLine(item.Content.ToString());
}
Console.ReadLine();
I suspect I may just be missing a step somewhere, but I can't seem to find a good tutorial on how to consume RSS feeds using these classes.