<p>I'm looking at a new project and we are wanting to use Flex (to provide the easy integration with AIR and provide a desktop app for our project). How easy does CakePHP play with Flex or is there a better PHP framework to use with Flex, or should we use none?</p>

If LINQ is in your toolbox, I would highly recommend using that to read/write xml as opposed to a DataTable.  It's much more fluent and intuitive and you can control where the nodes go...  wherever you add them to the collection is where they appear in the resulting XML.
Here's a quick intro and there's a metric ton of information out there on the web about it if you search a bit:
http://www.hookedonlinq.com/LINQtoXML5MinuteOverview.ashx