PDA

View Full Version : creating an XML from database



Angelcrazy
November 13th, 2006, 04:01 PM
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) '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. What I want 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

bwh2
November 13th, 2006, 06:14 PM
yes. show us what code you are using right now to write the xml. also show what format it is currently outputting.