This works fine to store and retrieve data from but I would
like to print this model as text. You know, for debugging or
writing to a file or so. All I tried failed
(newRestaurant.toString(), newRestaurant.dataProvider,...) they all
return objects and I would just like a plain structure.
The way I do it now is rebuilding the complete model as a
string with newRestaurant.restaurant.name kind of variables in it
which is plain stupid. There should be a really simple way of doing
this, isn't it?
I advise abandoning mx:Model forever and replacing it with
XML. Either in a variable, or declared as an mx:XML tag. A declared
mx:Model looks like XML, but it really gets converted to a nested
object structure. Why do that?
XML has MANY advantages. One, the answer to your question, is
you can use XML.toXMLString() to get the xml text.