syndicationfeed

Pull RSS Feeds From Facebook Page

南笙酒味 提交于 2019-12-20 14:20:28
问题 I need help to pull RSS feeds from a facebook page I'm using the following code but it keeps giving me an error : string url = "https://www.facebook.com/feeds/page.php?id=40796308305&format=rss20"; XmlReaderSettings settings = new XmlReaderSettings { XmlResolver = null, DtdProcessing=DtdProcessing.Parse, }; XmlReader reader = XmlReader.Create(url,settings); SyndicationFeed feed = SyndicationFeed.Load(reader); foreach (var item in feed.Items) { Console.WriteLine(item.Id); Console.WriteLine

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

佐手、 提交于 2019-12-13 11:36:01
问题 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: using (XmlReader xml = XmlReader.Create("https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en")) { var

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

只谈情不闲聊 提交于 2019-12-12 19:18:57
问题 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 TextReader. Since XMLDocument will load a string, I've tried to do this as follows (in the form of a Extension Method): public static SyndicationFeed ToSyndicationFeed(this

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

烂漫一生 提交于 2019-12-11 10:54:43
问题 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 alias throughout the document. I have seen examples that discuss using SyndicationFeed.AttributeExtensions as seen here. For example: feed.AttributeExtensions

Confused about namespaces in Atom feed

ε祈祈猫儿з 提交于 2019-12-10 15:26:43
问题 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 when I want it to add them like the former one. The code: feed.ElementExtensions.Add("totalResults", "opensearch", "2"); EDIT The root feed tag looks like this <feed

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

坚强是说给别人听的谎言 提交于 2019-11-30 23:16:05
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: using (XmlReader xml = XmlReader.Create("https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en")) { var items = from item in SyndicationFeed.Load(xml).Items select item; } Here's the exception: System.Net