# Creating an XML from database

**URL:** <https://forum.kirupa.com/t/creating-an-xml-from-database/206990>\
**Category:** Uncategorized\
**Created:** [November 13, 2006, 9:01pm UTC](https://forum.kirupa.com/t/creating-an-xml-from-database/206990 "2006-11-13T21:01:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Angelcrazy](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@Angelcrazy](https://forum.kirupa.com/u/Angelcrazy)\
**Post date:** [November 13, 2006, 9:01pm UTC](https://forum.kirupa.com/t/creating-an-xml-from-database/206990/1 "2006-11-13T21:01:05Z")

</div>

Hi,

Ive done the tutorial on [http://www.kirupa.com/web/mysql\_xml\_php.htm](http://www.kirupa.com/web/mysql_xml_php.htm%5D)[FONT=Verdana][SIZE=2][COLOR=black] ‘Output mySQL data as XML with PHP’. However what I have is a gallery.xml file, is there anyway I can edit this tutorial code to write my gallery.xml, like this:

\<gallery\>  
\<entry path=“main\_home\_images/1.gif” title=“Test 1” date=“12-11-2006” /\>  
\<entry path=“main\_home\_images/2.gif” title=“Test 2” date=“12-11-2006” /\>  
\</gallery\>

Basically what the xml is telling my flash file is to pull out main\_home\_images/1.gif and loading it dynamically. **[SIZE=3]What I want[/SIZE]** the php to do, is write this xml file into a directory from a MySql database I create with the fields:

Image Path  
Title  
Date

and obvisouly change the gallery.xml file to look like the code above. With the gallery, entry path, title and date tags intact, as this is what the flash swf, looks up.

Thanks!  
David  
[/COLOR][/SIZE][/FONT]
