Showing Error while consuming RSS Feed in ASP.NET- feed burner

Last Reply 6 days ago By dharmendr

Posted 6 days ago

Hi Sir, Below error is showing while i am consuming RSS feed.

Stylesheet must start either with an 'xsl:stylesheet' or an 'xsl:transform' element, or with a literal result element that has an 'xsl:version' attribute, where prefix 'xsl' denotes the 'http://www.w3.org/1999/XSL/Transform' namespace.

Here is the code:

<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="http://feeds.feedburner.com/ndtvnews-top-stories" 
TransformFile="http://feeds.feedburner.com/ndtvnews-top-stories" XPath="rss/channel/item"></asp:XmlDataSource>

<asp:DataList ID="DataList1" runat="server" DataSourceID="XmlDataSource1" BackColor="White" BorderColor="#404040" BorderStyle="Solid" GridLines="Vertical">
            <ItemTemplate>
             <%#XPath("title")%> 
             <%#XPath("pubDate")%>     
            </ItemTemplate>
            <AlternatingItemStyle BackColor="CadetBlue" />
            <ItemStyle BackColor="AliceBlue" ForeColor="Black" />
            <HeaderStyle BackColor="#804040" ForeColor="White" Font-Bold="true" />
        </asp:DataList>

Regards

firoz

You are viewing reply posted by: dharmendr 6 days ago.
Posted 6 days ago

Hi firoz1986,

Refer below article.

Fetch and Display RSS Feeds using ASP.Net