【问题标题】:Error parsing RSS feed with C#/Mono on Mac using SyndicationFeed.Load()使用 SyndicationFeed.Load() 在 Mac 上使用 C#/Mono 解析 RSS 提要时出错
【发布时间】:2015-03-26 10:12:25
【问题描述】:

我在 Windows 和 OSX 上运行以下代码,解析相同的源:

XmlReader r = new XmlReader(feedURI);
SyndicationFeed feed = SyndicationFeed.Load(r);

Visual Studio 和 Xamarin Studio 在 Windows 上的运行都非常棒。 Mac 上的 Xamarin Studio 在第二行失败。抛出的异常与“pubDate” XML 字段的解析有关(而 lastBuildDate 格式相同)。

我要解析的提要位于以下网址:http://www.tntvillage.scambioetico.org/rss.php?c=0&p=10

我尝试通过在自定义类中继承 XmlTextReader 来解决此问题,如下所示:

Exceptions with DateTime parsing in RSS feed use SyndicationFeed in c#

没有运气。

任何帮助将不胜感激。

【问题讨论】:

  • 你能发布完整的例外吗?
  • 还有一个提要的例子

标签: c# visual-studio mono rss xamarin-studio


【解决方案1】:

Argotic 库可以解决问题,适用于 .NET Framework 和 Mono,后者在 Mac OSX 环境中执行时不会引发任何异常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-19
    • 2017-10-28
    • 2012-11-08
    • 2012-06-12
    • 2016-01-17
    • 2013-09-25
    相关资源
    最近更新 更多