I have written a piece of code which uses
System.ServiceModel.Syndication library to parse RSS feeds.
The problem is that for one of my feeds (which is provided by facebook) I get the following line in the end of the response and Syndication library fails to parse the feed because it says the text is invalid XML and it says it's because of this part:
... </channel> <access:restriction relationship="deny" xmlns:access="http://www.bloglines.com/about/specs/fac-1.0" /> </rss>
I'm sure there is something I'm missing here, because both the feed and the parsing library are from huge companies (Facebook and Microsoft respectively).
Can any of you help? Or alternatively a better parser that doesn't rely on the validity of XML?
P.S. Here is my RSS feed url:
Here is how I'm parsing the feed response:
var stringReader = new StringReader(resp); var xreader = XmlReader.Create(stringReader); var xfeed = System.ServiceModel.Syndication.SyndicationFeed.Load(xreader);
and the exception I get:
System.Xml.XmlException: 'Element' is an invalid XmlNodeType. Line 282, position 4.
at System.Xml.XmlReader.ReadEndElement() ...