Transforming XML to HTML with XSL : XSLTProcessor « XML « PHP






Transforming XML to HTML with XSL

 
<?
$xslt = new XSLTProcessor();

$xslt->importStyleSheet(DomDocument::load('rss.xsl'));

$html = $xslt->transformToDoc($rss);

$html->formatOutput = true;
print $html->saveXML();
?>
  
  








Related examples in the same category

1.Load XML documents into a DOMDocument class and transform
2.Transforming XML with XSL
3.Transforming XML with XSLT and PHP functions