SharePoint: How to display blog feed using XML Web Part?

There is no RSS Viewer web part in Windows SharePoint Services 3.0 and my client wanted to show list feed on our intranet homepage. The constraint was, not to use some third-party Web Parts. Searching around the net, I found out that the XML Web Part is practically the same thing. After all, what’s an RSS feed other than an XML file? Getting a little creative, I thought of other ways to simply retrieve the content from other lists.


My solution? XML Web Part


Here's my list feed example as easy step-by-step guide.


1).Move to SharePoint page you want to add your list feed.


2).Open this page in edit view and add new Web Part called XML Web Part.


3).If Web Part is added to page then open it's settings window.


4).On the field XML Link insert your list feed URL. Check out if link is correct and content is receivable by clicking the link titled as Test Link.


5).Push button titled as [XSL Editor].


6).XSL editing window is opened and now insert XSL code given below. When inserted click [OK].


7).If everything is okay then you should see your list's titles as bulleted list and then save edited page.


XSL you need is here. Take it using copy and paste.

'<'?xml version="1.0" encoding="UTF-8"?'>'

'<'xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl"'>'

'<'xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/'>'

' <'xsl:template match="/"'>'

' <'div'>'

'<'xsl:apply-templates select="rss/channel"/'>'

'<'/div'>'

'<'/xsl:template'>'

'<'xsl:template match="rss/channel"'>'

'<'xsl:variable name="link" select="link"/'>'

'<'xsl:variable name="description" select="description"/'>'

'<'ul'>'

'<'xsl:apply-templates select="item"/'>'

'<'/ul'>'

'<'/xsl:template'>'

'<'xsl:template match="item"'>'

'<'xsl:variable name="item_link" select="link"/'>'

'<'xsl:variable name="item_title" select="description"/'>'

'<'li'>'

'<'a href="{$item_link}" title="{$item_title}" '>'

'<'xsl:value-of select="title"/'>'

'<'/a'>'

'<'/li'>'

'<'/xsl:template'>'

'<'/xsl:stylesheet'>

Note : There is a security issue in the above post. Please set the “Anonymous Access” for the site to "entire site".




















  • NOTE : "There is a security issue",We need to enable the Anonymous Access for the site collection,only then we are able to see the result.