# Sending generated XML to a file

**URL:** <https://forum.kirupa.com/t/sending-generated-xml-to-a-file/244546>\
**Category:** programming\
**Created:** [November 19, 2007, 5:26pm UTC](https://forum.kirupa.com/t/sending-generated-xml-to-a-file/244546 "2007-11-19T17:26:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![the\_fear66](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@the\_fear66](https://forum.kirupa.com/u/the_fear66)\
**Post date:** [November 19, 2007, 5:26pm UTC](https://forum.kirupa.com/t/sending-generated-xml-to-a-file/244546/1 "2007-11-19T17:26:04Z")

</div>

Hello there

I’ve been having a good look at the XML / PHP tutorial at [http://www.kirupa.com/web/mysql\_xml\_php.htm](http://www.kirupa.com/web/mysql_xml_php.htm)

I’ve managed to customise the PHP to generate the XML just as I want it, but I would like to be able to export the data to an XML file for reading by a Flash object. Can anyone help me to add a bit to the end of the script that writes the data to an XML file, overwriting any existing data each time the script is run?

Many thanks in advance.  
Matt
