load( 'data.xml' ); $xsl = new DomDocument; $xsl->load( 'overview.xsl' ); // Transform $proc = new XSLTProcessor; $proc->importStyleSheet($xsl); $result = $proc->transformToXML($xml); if ($result) { print $result; } else { print "Transformed failed.\n"; } ?>