Write at the top of the xml file

I have a flash guest book. With every entry new xml node is placed at the end of the xml file.
How do I append new xml node at the top of the file. With this code it goes to the botom.

$file = fopen("…/xml/guestbook.xml", “w+”) or die(“Can’t open XML file”);
$xmlString = $HTTP_RAW_POST_DATA;
if(!fwrite($file, $xmlString)){
print “Error writing to XML-file”;
print $xmlString."