I am a beginner in PHP and I know nothing about XML manipulation. I am working on a Google CSE annotation XML shown below:
There is nothing wrong with $dom->save("test.xml");
.
You dont need to do the save with DOM though. Could just as well do it with SimpleXML:
$xml->saveXML("test.xml");
Make sure the destination folder is writable. Use an absolute path to make sure you are actually looking for the file in the right location.