xsl transform template for php5

// path to the xml document (may be url)
$xml = "data.xml";
// path to the xsl document (may be url)
$xsl = "transformation.xsl";  

$xslDoc = new DOMDocument();

$xmlDoc = new DOMDocument();

$proc = new XSLTProcessor();
echo $proc->transformToXML($xmlDoc);

Leave a comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.