4 ms·
Throw in php in the mix and you have a wonderful solution for templating with bullet proof standards: // XML $xml_doc = new DOMDocument(); $xml_doc->load("file
by ulrischa 1y ago
Throw in php in the mix and you have a wonderful solution for templating with bullet proof standards:
// XML
$xml_doc = new DOMDocument();
$xml_doc->load("file1.xml");
// XSL
$xsl_doc = new DOMDocument();
$xsl_doc->load("file.xsl");
// Proc
$proc = new XSLTProcessor();
$proc->importStylesheet($xsl_doc);
$newdom = $proc->transformToDoc($xml_doc);
print $newdom->saveXML();
XSLT lacks functionality? No problem, use php functions in xslt: https://www.php.net/manual/en/xsltprocessor.registerphpfunctions.php https://www.php.net/manual/en/xsltprocessor.registerphpfunct...
RTFM