I am trying to find out a way I can pass a variable that is basically an XML document to xslt_process and make it all work. My script works if I have: $xp = xslt_create(); $result = xslt_process($xp, 'test.xml', 'test.xsl'); however, if I try to do: $xp = xslt_create(); $result = xslt_process($xp, $xmldata, 'test.xsl'); it won't work. $xmldata contains an XML document, but for some reason it errors out on me, any ideas on how to make this work? I basically have the XML data generated dynamically from a database and then I want to pass it to the XSLT to process the page. Any help would greatly be appreciated.