heres the deal. Im using XSL to add/modify/remove data from an XML file. So far the XSL works nicely
But heres the problem. when using the xslt_process function, i cant specify the source XML file to be the destination XML file, IE to overwrite the original with the resulting XML processed by the XSL file
So far i have been renaming the newly created file, after deleting the original. I dont like doing it that way, is there a way i can do it with the xslt_process function.
Dont recommend DOM or SAX, i hate them. Anyway, XSLT is the way to go, much easier to use.
Thanks for any time you spend on this
here is an example of the way if doing the XSLT Processing
$xslt = xslt_create();
//Array () and $Variable are passed to the XSL and picked up by a
//parameter in the XSL, its like passing a variable
if (!$res = @xslt_process($xslt, $sourceXML, $sourceXSL, $destXML, Array(), $Variable))
{
print ("Error: <b>" . xslt_error($xslt) . "</b><br/>" . "Code: <b>" . xslt_errno($xslt) . "</b>");
}
xslt_free($xslt);
print $res;
the output of this is the number 1, indicating that there has been no error, and the file has been written.
What i would like to do is fwite it to the original file, but the XSL produces XML data, not a string, any ideas??