syndicationfeed

How do you properly use xmlns namespaces with custom extensions to .NET SyndicationFeeds?

I am using the .NET SyndicationFeed class and have added some of my own extensions using SyndicationItem.ElementExtensions.Add() as well as setting SyndicationItem.Content to some Xml content. My problem is that my namespace shows up multiple times in the XML output. Ideally I would apply a xmlns attribute to the root node and use its ...

Reading content text from SyndicationContent

Hi i am trying to read the content into string from feed items. SyndicationFeed feed = SyndicationFeed.Load(feedReader); SydicationContent itemContent = feed.Items.ToList<SyndicationItem>()[0].Content; string retrivedContent = itemContent .......??? how can I read the text from the itemContent ? The documentation shows how to cr...

Dealing with XML errors in RSS feeds using SyndicationFeed.Load

When reading in a 3rd party RSS feed an XMLException is thrown due to an invalid DateTime in the feed XML. How can I handle this more robustly. For example, is there a way to catch the exception, identify the problematic element and deal with it (e.g. insert a placeholder) and continue the load? ...

Is there a way to create a SyndicationFeed from a String?

Hi, I'm trying to recreate a SyndicationFeed object (System.ServiceModel.Syndication) from XML data that has been stored locally. If I were working with XMLDocument, this would be easy.I'd call LoadXml(string). The SyndicationFeed will only load from an XMLReader. The XMLReader will only take a Stream or another XMLReader or a TextRe...

How do I read a secure rss feed into a SyndicationFeed without providing credentials?

For whatever reason, IBM uses https (without requiring credentials) for their RSS feeds. I'm trying to consume https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en with a .NET 4 SyndicationFeed. I can open this feed in a browser and it loads just fine. Here's the code: ...

System.ServiceModel.Syndication.SyndicationFeed determine feed type (RSS vs Atom)?

Is it possible to determine from the syndicationfeed class what type of syndicationfeed is being read? If all I have is the url (blahblah.com/feed) it might be rss or atom, and depending on the type I want to do one thing or the other. Is there a simple way to tell without parsing the document and looking for specific characters? ...

Confused about namespaces in Atom feed

Is there any difference between <opensearch:totalResults>1000</opensearch:totalResults> and <totalResults xmlns="opensearch">1000</totalResults> I'm using the SyndicationFeed class in .NET to generate an Atom feed, and I need to add some elements for the opensearch standard, but it keeps adding elements like the latter one above w...