# Multiple-array in xml to Flash

**URL:** <https://forum.kirupa.com/t/multiple-array-in-xml-to-flash/171951>\
**Category:** Uncategorized\
**Created:** [December 9, 2005, 2:42pm UTC](https://forum.kirupa.com/t/multiple-array-in-xml-to-flash/171951 "2005-12-09T14:42:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![royend](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@royend](https://forum.kirupa.com/u/royend)\
**Post date:** [December 9, 2005, 2:42pm UTC](https://forum.kirupa.com/t/multiple-array-in-xml-to-flash/171951/1 "2005-12-09T14:42:46Z")

</div>

Hi.  
I haven’t been able to find the solution to my problem in the tutorials, therefore I hope some of you may help me.

I have an xml-file which creates this:  
\<product\>  
\<item\>Banana\</item\>  
\<color\>yellow\</color\>  
\<tasty\>yes\</tasty\>  
…  
\</product\>  
\<product\>  
\<item\>Apple\</item\>  
…  
\</product\>

To access these variables with Flash I use the usual XML-object/class:  
var myXML:XML = XML();  
myXML.load(“fil.xml”);  
myXML.onLoad = function(){  
for(i=0; i\<lenght;i++){  
myArray\* = this.firstChild.childNodes\*.childNodes\*.firstChild.nodeValue;

This is where something goes wrong…  
Am I not accessing the correct items? The idea was to create an array with the item-name, but it just returns “undefined”.

Please help me with this.  
Best regards,  
royend
