C# XmlReader Help

I'm trying to fetch my Facebook RSS Feed using the XmlReader in System.Xml, but it returns this error:


A first chance exception of type 'System.Xml.XmlException' occurred in System.ServiceModel.dll
An exception of type 'System.Xml.XmlException' occurred in System.ServiceModel.dll but was not handled in user code
Additional information: The element with name 'html' and namespace '' is not an allowed feed format.

My code for the RSS Fetch.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  if(checkrssfeed)
                {
                    SpeechSynthesizer synthesizer = new SpeechSynthesizer();
                    synthesizer.SelectVoice(voice);
                    string url = "(My Facebook RSS Feed Link)";
                    XmlReaderSettings settings = new XmlReaderSettings();
                    settings.DtdProcessing = DtdProcessing.Parse;
                    settings.ValidationType = ValidationType.DTD;
                    settings.ValidationEventHandler += new ValidationEventHandler(ValidationCallBack);
                    XmlReader reader = XmlReader.Create(url, settings);
                    SyndicationFeed feed = SyndicationFeed.Load(reader);
                    reader.Close();
                    foreach (SyndicationItem item in feed.Items)
                    {
                        String subject = item.Title.Text;    
                        String summary = item.Summary.Text;
                        synthesizer.Speak("Notification Title");
                        synthesizer.Speak(subject);
                        synthesizer.Speak("Notification Summary");
                        synthesizer.Speak(summary);
                    }
                    synthesizer.Dispose();
                    checkrssfeed = false;
                }

Help would be appreciated!
Last edited on
Well thanks at least to redirecting me to a C# forum
Topic archived. No new replies allowed.