This content has been marked as final. Show 3 replies
The labelFunction will be the solution, but I don't know why you are getting the error.
If I get a chance, I will look into this.
I have never liked mx:Model or the default mx:Object resultFormat for that very reason: I can never predict exactly how Flex will deserialize the xml in an object structure. I used XML exclusively in 1.5 and am using e4x in2.0. So I can't help with the question, just advise staying with e4x.
All data in XML is treated as Strings because an XML document is purely text. The Flex parser doesn't do any conversion - it would take too long to determine if every possible value is a String, Number, date, etc.
If you believe you have a number, then do:
var n:Number = Number( node.value );
if( isNaN(n) ) n = 0; // node.value was not a legal number
One uf us is misunderstanding the issue. I think he means that he has xml like this:
and mx:Model is converting it to an Object with a reference path "root.1" when he is expecting a reference path: root.1.0. Obviously that path is invalid, so if the node Name has a period in it I think Model will never work quite right.