Php THEN xml to flash

I have been messing around with php getting data to flash, but have read/heard that a more effiecient way to handle data, something like an image gallery would be to have php write to or create an xml file, and then have flash read the xml file instead of taking the data straight from php.
Anyone have experience with this? Is it a better way, or just an extra step?

I don’t need to know how to do it, I am mostly just hoping for some feedback on whether its a good idea or not.