<?php
$path_xml = "f.xml";
$path_style = "f.xsl";
$xml_obj = new DomDocument;
$xsl_obj = new DomDocument;
if (!$xml_obj->load($path_xml)) {
echo "Error! Unable to open " . $path_xml . "!\n";
exit;
}
if (!$xsl_obj->load($path_style)) {
echo "Error! Unable to open " . $path_style . "!\n";
exit;
}
$xslt_parse = new xsltprocessor;
$xslt_parse->importStyleSheet($xsl_obj);
echo $xslt_parse->transformToXML($xml_obj);
?>
|