XML writing problems
Posted: Thu Nov 01, 2007 7:21 pm
Hi all,
I've got a strange XML problem, and I've got no idea where to start looking. Writing to an XML file worked fine when I used DOM methods, but I've switched to the simplexml method of loading it and then saving it with What happened recently was everything was cleared out of the XML file except for this line: where previously, there was an internal DTD plus the root element and all its children.
Now I have no idea what could cause this, but I suspect it has something to do with or the output from simplexml. Can anyone give me some place to start looking or how to figure out what's causing the problem? So far, this has only happened once, so I can't really test any solutions immediately, as I don't know how to reproduce the behavior. I can post more code if it will help.
Thanks!
I've got a strange XML problem, and I've got no idea where to start looking. Writing to an XML file worked fine when I used DOM methods, but I've switched to the simplexml method of loading it and then saving it with
Code: Select all
file_put_contents('filename.xml', $xml->asXML())Code: Select all
<?xml version="1.0"?>Now I have no idea what could cause this, but I suspect it has something to do with
Code: Select all
file_put_contents()Thanks!