Hi there, I am trying to read an RSS feed using C# and Linq to XML. The feed is encoded in utf-8 (see http://pc03224.kr.hsnr.de/infosys/feed/) and reading it out generally works fine except for the description node because it is enclosed in a CDATA section.
For some reason I can't see the CDATA tag in the debugger after reading out the content of the "description" tag but I guess it must be there somewhere because only in this section the German Umlaute (äöü) and other special characters are not shown correctly. Instead they remain in the string utf-8 encoded like ü
.
Can I somehow read them out correctly or at least decode them afterwards?
This is a sample of the RSS section giving me troubles:
<description><![CDATA[blabla bietet Hörern meiner Vorlesungen “IAS”, “WEB” und “SWE” an, Lizenzen für blabla [...]]]></description>
Here is my code which reads out and parses the RSS feed data:
RssItems = (from xElem in xml.Descendants("channel").Descendants("item")
select new RssItem
{
Content = xElem.Descendants("description").FirstOrDefault().Value,
...
}).ToList();
Thanks in advance!