MVC2 - consume RSS feed with RDF and namespace http://www.w3.org/1999/02/22-rdf-syntax-ns# '

I am trying to read a feed for the Washington Fish and Wildlife Squad and save this error:

An element named 'RDF' and the namespace 'Http://www.w3.org/1999/02/22-rdf-syntax-ns#' is not a valid feed format.

Here is the code from RssController:

public virtual ActionResult Index() { string feedUrl = @"http://wdfw.wa.gov/news/newsrss.php"; using (XmlReader reader = XmlReader.Create(feedUrl)) { **SyndicationFeed rss = SyndicationFeed.Load(reader);** return View(rss); } } 

I made seveal RSS applications, but nave never encountered this problem. Has anyone got any specific ways to parse this in ASP.NET MVC 2? (asterisk strings where an exception occurs.

+4
source share
2 answers

No support for RSS 1.0. An example of how to enable your own support is here: http://www.4guysfromrolla.com/articles/031809-1.aspx

+5
source

This may not apply to you, since it seems that you are only interested in RSS, but if you want RDF support for your application (RSS 1.0 uses RDF / XML to encode data), you can try my dotNetRDF library.

I suspect the full-blown RDF API is probably too picky, judging by your question.

+2
source

All Articles