Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Reading mrss Feeds using SyndicationFeed

$
0
0

Hi,

I am having an application that reads RSS feeds from different sites using SyndicationFeed classes as below.

XmlReader reader = XmlReader.Create(feedUrl);
SyndicationFeed feedsList =  SyndicationFeed.Load(reader);
foreach (SyndicationItem syndicationObj in feedsList.Items)
{
//Extratct Needed Info
}

It is working fine with most RSS feeds URLs. The issue happens when I provide some URLs including .mrss or .aspx extensions. It doesnt retrieve and feeds and throw this exception: "For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method."

Some posts advised to set some settings for the XMLReader such as the below settings but nothing worked for me.

XmlReaderSettings settings = new XmlReaderSettings();
settings.DtdProcessing = DtdProcessing.Ignore;
settings.ProhibitDtd = false;
settings.XmlResolver = null;
settings.ValidationType = ValidationType.None;

Does anyone knows why this happening and how to solve it. Thank you in advance.


Ehab


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>