Transforming XML with XSLT and PHP functions : XSLTProcessor « XML « PHP






Transforming XML with XSLT and PHP functions

 
<?
$dom  = new DOMDocument;
$dom->loadXML('<blank/>');
$xsl  = new DOMDocument;
$xsl->load('stylesheet.xsl');

$xslt = new XSLTProcessor(); 
$xslt->importStylesheet($xsl);
$xslt->registerPHPFunctions(); 
print $xslt->transformToXML($dom);
?>
  
  








Related examples in the same category

1.Load XML documents into a DOMDocument class and transform
2.Transforming XML to HTML with XSL
3.Transforming XML with XSL