I have a problem with using DOM that is has been annoying me for days. I’m trying to use an xslt process to match up an xml and an xsl file with dom documents. The easiest way I’ve found, which is basically used in most of the examples I’ve found, is the following…
<?php $xml = new DOMDocument(); $xml->load('xmlfile.xml'); $xsl = new DOMDocument(); $xsl->load('xslfile.xsl'); $xslt = new XSLTProcessor(); $xslt->importStylesheet($xsl); echo $xslt->transformToXML($xml); ?>
I can’t use this for the simple reason the the load() method in the DOMDocument class does not exist for me, nor can I find any information as to why it doesn’t and I’ve been trying to find some kind of explanation for days now.