IXMLDOMDocument2 interface has a save method. Check this.
Pavan
2009-11-16 07:56:50
To save with a dynamic name, you can do something like this in PHP:
//Set dynamic name - used microtime in this example but you could change this
//to another dynamic naming scheme
$dynamicPlaylistName = microtime();
//Save XML with dynamic name
$dom->save($dynamicPlaylistName.'.xml');
The code above sets dynamicPlaylistName to whatever you put after the equals sign on that line, and then saves the xml with the value of dynamicPlaylistName as its file name with '.xml' appended to it.
If you also want the XML file to be formatted with indents and nesting, see my answer to this question. Note that you would likely only need to add the following two lines somewhere prior to saving the XML to get formatting in your case:
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;