RSS feed XSL stylesheet example
November 23, 2011 13:57:51 Last update: November 23, 2011 13:57:51
An easy to digest stylesheet example for XSLT for RSS. Simply list item titles descriptions:
URL for Google news feed: http://news.google.com/news?ned=us&topic=h&output=rss
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <!-- suppress default default text node output --> <xsl:template match="text()"/> <xsl:template match="/rss/channel/item"> <h2><a href="{link}"><xsl:value-of select="title"/></a></h2> <div> <xsl:value-of select="description" disable-output-escaping="yes"/> </div> </xsl:template> </xsl:stylesheet>
URL for Google news feed: http://news.google.com/news?ned=us&topic=h&output=rss