I keep getting this error randomly when trying to read ARSTECHNICA RSS feed. I get the following error:
System.Xml.XmlException: ”, hexadecimal value 0x10, is an invalid
character. Line 96, position 1129.
I know that it is because of invalid charatercs in XML and it needs to be removed. I did look at this for removing invalid charaters.
XmlReader readXML;
readXML = XmlReader.Create(URL);
SyndicationFeed News= SyndicationFeed.Load(readXML);
readXML.Close();
return News;
I ‘m not sure how to remove the invalid characters from the RSS feed. Any suggestions?
Thanks
You could try to load the rss feed as a string, remove the invalid characters and load as a news feed. Hope that helps: