<?php // Create a DomDocument object from an xml file. if( !$domXmlObj = domxml_open_file( "example.xml" ) ) { die( "Cannot parse the xml file." ); } // Create a DomDocument object from the xslt file. $domXsltObj = domxml_xslt_stylesheet_file( "example.xslt" ); // Create a DomDocument object from the xslt transformation // of the xml and xslt file. $domTranObj = $domXsltObj->process( $domXmlObj ); // Display the output of the DomDocument object // from the xslt transformation. echo $domXsltObj->result_dump_mem( $domTranObj ); ?> |