I have xml file with data as below and i want to convert this into Flex ArrayCollection including the id and name of the tags. I am using httpService to get the file.
data.xml
<data>
<result month="Jan" value="0.666">
<info id="jan01Display" name="jhon" age="20" />
<info id="jan02Display" name="adams" 开发者_运维技巧age="24" />
<info id="jan03Display" name="prasad" age="27" />
</result>
</data>
Why not return an array collection instead of XML then. Just change the HTTPService and remove the resultFormat="e4x"
attribute and then change your result handler to include something like:
var myAC:ArrayCollection = event.result.data.result;
instead of:
var myXML:XML = event.result.data;
I think that should do it for you. If not, post a code example of both your HTTPService and your Result Handler and We'll figure it out for you.
精彩评论