XSLT Example 1

BBC RSS

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html"/>

  <xsl:template match="/">
    <html>
      <head>
        <title>
          <xsl:value-of select="/rss/channel/title"/>
        </title>
      </head>
      <body>
        <h1><xsl:value-of select="/rss/channel/title"/></h1>
        <p>
          <xsl:value-of select="/rss/channel/description"/>
        </p>
      </body>
    </html>
  </xsl:template>
  
</xsl:stylesheet>

Copyright © 2002-2009 David P. Heitmeyer

Bookmark and Share