PHP XML AND XSL Mystery
Posted: Thu Jun 05, 2008 6:22 am
Hi I'm new to this forum and I am hoping someone here can help with my query.
I'm getting this error:
Catchable fatal error: Argument 1 passed to XSLTProcessor::importStylesheet() must be an instance of DOMDocument, instance of SimpleXMLElement given in portfolio.php on line 39
I stumped on what this error means. My code is below, can anyone lead me in the right direction? THANKS!
PHP
My XML can be found here: http://www.ican.ie/html/includes/portfolio.xml
I'm getting this error:
Catchable fatal error: Argument 1 passed to XSLTProcessor::importStylesheet() must be an instance of DOMDocument, instance of SimpleXMLElement given in portfolio.php on line 39
I stumped on what this error means. My code is below, can anyone lead me in the right direction? THANKS!
PHP
Code: Select all
$portfolio = simplexml_load_file('includes/portfolio.xml');
$xsl = simpleXML_load_file('includes/portfolio.xsl');
$proc = new XsltProcessor();
$proc->importStylesheet($xsl); <-- THIS IS LINE 39