To Customize the SharePoint OOB RSS Viewer WebPart

In SharePoint we have Out-Of-the-Box (OOB) RSS Viewer web part to display the content retrieved from the Really Simple Syndication (RSS) feeds from various sources. But if you want to change the way it is displayed in the RSS Viewer then we can make use of the XSL editor or file to modify it.
 
The below example shows how to change the view of the content in RSS Viewer using XSL template.
 
Step 1
 
Adding RSS Viewer to the SharePoint page.
 
 
 
Click on add WebPart
 
 
Select WebPart from the top ribbon
 
 
 
Step 2
 
Add "RSS Viewer" WebPart as shown below.
 
 
 
Step 3
 
To configure RSS Viewer WebPart click the "Open the tool pane" link
 
 
Provide the RSS Feed link and specify other parameters in the tool pane displayed on the right side. Finally click ok to finish the setup. Below seen example is the default view.
 
 
Step 4
 
To customize the display format using XSL template please follow the below things.
 
 
 
Click on the "XSL Editor" in the "Tool pane", copy and paste the below code in the editor to change the display styles.
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <xsl:stylesheet version="1.0"  
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  
  4. <xsl:output method="html"/>  
  5. <xsl:template match="/">  
  6. <xsl:apply-templates select="/rss/channel/item"/>  
  7. </xsl:template>  
  8. <xsl:template match="item">  
  9. <strong><span style="color: green; font-size: 12pt"><xsl:value-of select="title"/> </span></strong><br/>  
  10. <span style="color: grey; font-size: 8pt"><xsl:value-of select="pubDate"/></span>  
  11. <p>  
  12. <xsl:value-of disable-output-escaping="yes" select="description"/>  
  13. </p>  
  14. </xsl:template>  
  15. </xsl:stylesheet>  
Most of the RSS feeds will have the properties like Title, Description and Published Date. So the above XSL template can be modified according to your needs.
 
Final output
 
Ebook Download
View all
Learn
View all