This has been frustrating me for a while...
Basically a small bit of background info. I am first taking an streamed XML
file, but for this example it is static (not streaming). The XML file looks
like this.. (without the node's)
3715,874.00,876.00,882.50,854.50,7.25,1,100235,875.00,0|3716,1180.00,1181.00,119
5.00,1151.00,10.00,1,100235,1180.50,0|
I have converted this to a string, then split the string along the pipes to
get each value set in an array, I have then split the array again along the
comma's to get each value separated. I then collect each value in an array.
I now want to put this final array into a datamodel so that I can output the
arrays into corresponding columns in a datagrid.
I can get the data into a datagrid but its comes out as a string (the whole
array output in 1 row). I think this is because a standard Datamodel assume's
its value is a string. I have tried using the example from the help docs which
declares an object with arrays inside but this will not work. I get errors. It
doesn't look formatted correctly, but when I try it failes:
<mx:Object id="model1">
<employees>
<mx:Object>
<mx:Array>
<name>
<mx:Object>
<first>
<mx:String></mx:String>
</first>
<last>
<mx:String></mx:String>
</last>
</mx:Object>
</name>
<department>
<mx:String></mx:String>
</department>
<email>
<mx:String></mx:String>
</email>
</mx:Object>
</employees>
</mx:Array>
</mx:Object>
Please help!
Thanks, Mark
|