Tying MySQL to Flash/Flex via PHP

I've played around some with Flex since the Flex Builder 2 beta came out for Mac a few months back and I am very excited. I've also created some Flash applications (meant to be run on the desktop not in the browser) which connected to a MySQL database via some PHP scripts. What I'm curious about is this:

Flex needs everything to be in some form of XML in order to run (as far as I know, anyway) which means that I'd need to either write scripts or use the XML-RPC PEAR libraries to get my database data into an appropriate format.

This is essentially the same process for Flash, though there are other options such as serializing the data and sending it in this way.

How do you get your data into Flash/Flex and do you think using Flex for projects which aren't tying into already established web services is a bad approach?

Comments

Yes i'm agree with Cahlan.

AMFPHP is VERY easy to configure and to use.... and very FAST.

Go to http://www.sephiroth.it/ for some good AMF / FLEX tutorials

Ever tried Flash Remoting? Try researching AMFPHP and Flash Remoting, it may change your current method of working with XML, especially in Flash.

You don't have to use XML for everything. One very simple way of communicating between PHP and Flex is to use an mx:HTTPService component and set the "resultFormat" to text. This allows you to fill text fields with ordinary text. By setting a TextArea to htmlText, you can even format the incoming text with HTML.