I have the following PHP code. The XSL transformation works fine, and echoes a string fine to the server, but when I try to save, I get "Fatal error: Call to undefined method stdClass::save()" Using PHP 5.3 Simple problem?
<?php
$xml = new DOMDocument;
$xml->load('myxml.xml');
$xsl = new DOMDocument;
$xsl->load('myxsl.xsl');
$proc = new XSLTProcessor();
$proc->importStylesheet($xsl);
$newXml = $proc->transformToXML($xml);
$newXML->formatOutput=true;
echo $newXml;
$newXML->save("newfile.xml")or die("Error");
?>