Michael,
 
Try the attached code.Worked for me.
 
Good luck,
Peter
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="page">
 <html>
  <head>
   <title><xsl:value-of select="title"/></title>
  </head>
  <body bgcolor="#ffffff">
   <xsl:apply-templates/>
  </body>
 </html>
</xsl:template>


<xsl:template match="title">
 <h1 align="center">
  <xsl:apply-templates/>
 </h1>
</xsl:template>


<xsl:template match="text">
 <p align="center">
  <i><xsl:apply-templates/></i>
 </p>
</xsl:template>


</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" ?>
<page>
 <title>Hello World!</title>
 <text>This is my first XML parsed file!</text>
</page>

hello.php

Reply via email to