Getting flash to write an xml file

is there any way to get flash (via actionscript) to write an xml file?

What I’d like to do is build a picture gallery which only requires me to upload images/thumbnails/description text to specific directories on my web server, these images will then be viewable in my gallery without me having to edit the code.

One way I’ve seen of doing this is to store the information about the images locations in an xml file.

Can flash/actionscript write an xml file based on the directory structure?

any suggestions most welcome

mandrill