Do it Yourself RSS Aggregator in Windows SharePoint Services
A reader asked me about an entry I wrote a while ago that talks about how to use the built in XML Web Part in SharePoint to display an RSS feed. Since an upgrade here on OfficeZealot, the resource file links don't work, so I thought I'd update the article. The method remains the same, I'm just providing the XSL code here. Here is what you need to do to make it work:
- Add an XML Web Part to a page.
- Edit the XML Web Parts properties
- In the XML Link field, enter the URL of the RSS feed.
- In the XSL Link field, enter the URL of an XSL file that you've written to transform the feed, or alternatively, in the “XSL Editor“, enter the following XSL code (here's what it should look like after you're done):
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="tablebg"><table border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><img src="images/spcacer.gif" width="163" height="1" /></td>
</tr>
<tr valign="middle">
<td><h2>Recent Articles</h2>
</td>
</tr>
<xsl:for-each select="rss/channel/item">
<tr>
<td><a href="{link}"><xsl:value-of select="title"/></a></td>
</tr>
</xsl:for-each>
<tr>
<td><a href="/allarticles.aspx">More...</a></td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>