just use the php file functions: http://www.php.net/manual/en/ref.filesystem.php
PHP Code:
<?php
$fh = fopen( 'filename.xml', 'w' ); // to create an xml file, or open an existing on with that same name;
$xml_contents = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
";
fwrite( $fh, $xml_contents );
fclose( $fh );
`i think thats right, something along those lines. I havn't written anything for files for a long time so could be a little rusty.