我尝试读取鱼类和野生动物的华盛顿Departmene饲料,并保持ETTING这个错误:
I' trying to read the feed for the Washington Departmene of Fish and Wildlife, and keep etting this error:
与NAME的元素RDF和 命名空间 www.w3/1999/02/22-rdf-syntax-ns# 是不是允许饲料格式。
The element with name 'RDF' and namespace 'www.w3/1999/02/22-rdf-syntax-ns#' is not an allowed feed format.
下面是从RssController的code:
Here's the code from RssController:
public virtual ActionResult Index() { string feedUrl = @"wdfw.wa.gov/news/newsrss.php"; using (XmlReader reader = XmlReader.Create(feedUrl)) { **SyndicationFeed rss = SyndicationFeed.Load(reader);** return View(rss); } }我已经做了seveal RSS应用程序,但绝不殿遇到了这个问题。任何人都得到了能够在ASP.NET MVC 2解析这个任何具体的方法呢? (与asterics该行是在发生异常。
I've done seveal RSS applications but nave never ran into this issue. Anyone got any concrete ways of being able to parse this in ASP.NET MVC 2? (the lines with asterics are where the exception happens.
推荐答案有对RSS 1.0的支持。如何在这里推出自己的支持,例如:www.4guysfromrolla/articles/031809-1.aspx
There's no support for RSS 1.0. Example of how to roll your own support here : www.4guysfromrolla/articles/031809-1.aspx
更多推荐
MVC2
发布评论