PHP or PHP/XML to drive gallery contents?

Basically, I’ve got myself a gallery which is generated from the contents of an XML file. (I just followed this excellent tut!):beam:

I’ve decided that its too much hassle to update the XML file everytime a new image is added to the directory, so I’m thinking about using PHP to build the XML file. That means that going from PHP->XML->Flash. Can I just go straight from PHP->Flash? All I want to do is get a list of files in /directory_x. Are there any obvious benefits/drawbacks to either method?

Thanks for any help! :toad: