0

我按照本教程在 ASP.NET 网站中使用外部 RSS 提要 - Visual Studio 2010

尝试在我的网站上显示 Facebook RSS 提要。这是生成的代码:

<form id="form1" runat="server">
<div>

    <asp:ListView ID="ListView1" runat="server" DataSourceID="XmlDataSource1">
    <LayoutTemplate>
    <ul>
    <asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
    </ul>
    </LayoutTemplate>
    <ItemTemplate>
    <li><a href="<%#XPath("link") %>"><%#XPath("title") %></a></li>
    </ItemTemplate>
    </asp:ListView>


</div>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" 
        DataFile="http://feeds.bbci.co.uk/news/rss.xml?edition=uk" 
        XPath="rss/channel/item"></asp:XmlDataSource>
</form>

代码隐藏文件中没有任何内容。这似乎适用于几乎任何 RSS 提要。但如果我尝试使用我的 Facebook RSS 提要:

http://www.facebook.com/feeds/page.php?format=rss20&id=1425042407719904

它因以下错误而崩溃:

An error occurred while parsing EntityName. Line 9, position 30.

使用/解析 Facebook RSS 提要时是否需要做一些额外的事情?

谢谢。

4

1 回答 1

1

好的。一直没找到原因。最后,我通过 feedburner.com 路由了提要,这似乎解决了这个问题。

于 2013-09-19T09:43:14.710 回答