MVC2 - 消费与RDF RSS提要,并命名http://www.w3.org/1999/02/22-rdf-syntax-ns#“ [英] MVC2 - Consume RSS feed with RDF and namespace http://www.w3.org/1999/02/22-rdf-syntax-ns#'

查看:403
本文介绍了MVC2 - 消费与RDF RSS提要,并命名http://www.w3.org/1999/02/22-rdf-syntax-ns#“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试读取鱼类和野生动物的华盛顿Departmene饲料,并保持ETTING这个错误:

I' trying to read the feed for the Washington Departmene of Fish and Wildlife, and keep etting this error:

与NAME的元素RDF和
  命名空间
  http://www.w3.org/1999/02/22-rdf-syntax-ns#
  是不是允许饲料格式。

The element with name 'RDF' and namespace 'http://www.w3.org/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 = @"http://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的支持。如何在这里推出自己的支持,例如:<一href=\"http://www.4guysfromrolla.com/articles/031809-1.aspx\">http://www.4guysfromrolla.com/articles/031809-1.aspx

There's no support for RSS 1.0. Example of how to roll your own support here : http://www.4guysfromrolla.com/articles/031809-1.aspx

这篇关于MVC2 - 消费与RDF RSS提要,并命名http://www.w3.org/1999/02/22-rdf-syntax-ns#“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆