I followed this tutorial Use external RSS feed in ASP.NET website - Visual Studio 2010

To try and display a Facebook rss feed on my website. This was the resulting code:

<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>

With nothing in the codebehind file. This seem to work with pretty much any RSS feed. But if I try with my Facebook RSS feed:

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

It falls over with the following error:

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

Is there something extra needs doing when consuming/parsing a Facebook RSS feed?

Thanks.

有帮助吗?

解决方案

Ok. Never did find the reason for this. In the end I routed the feed via feedburner.com which seemed to resolve the issue.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top