Mega Code Archive

 
Categories / Php / XML
 

Load XML documents into a DOMDocument class and transform

<?     $xsl = new DOMDocument( );     $xml = new DOMDocument( );     $xsl->load("input.xsl");     $xml->load("employees.xml");     $xsltproc = new XSLTProcessor( );     $xsltproc->importStylesheet($xsl);     echo $xsltproc->transformToXML($xml); ?>