# Really Simple XML/Array Question

**URL:** <https://forum.kirupa.com/t/really-simple-xml-array-question/251140>\
**Category:** flash\
**Created:** [February 5, 2008, 7:00pm UTC](https://forum.kirupa.com/t/really-simple-xml-array-question/251140 "2008-02-05T19:00:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![misterpatrick](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@misterpatrick](https://forum.kirupa.com/u/misterpatrick)\
**Post date:** [February 5, 2008, 7:00pm UTC](https://forum.kirupa.com/t/really-simple-xml-array-question/251140/1 "2008-02-05T19:00:10Z")

</div>

Hello all,

I am rewriting a slideshow to be AS3 compliant and having some problems with some relatively simple things. The slideshow reads and XML file and then using a dynamic resizer displays the image and comments. So far, I am stuck at creating the arrays for the images and comments. Here’s an example. The trace(imageElement) is working fine, but the push seems to be doing nothing whenever I query the array. So something simple is going wrong here. If anyone has a link to a tutorial for a slideshow like this, I’d appreciate it.

```auto

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
 
xmlLoader.addEventListener(Event.COMPLETE, LoadXML); 
xmlLoader.load(new URLRequest("images.xml"));

function LoadXML(e:Event):void {
    xmlData = new XML(e.target.data);
    ParseImages(xmlData); 
}

var imageArray:Array = new Array(); //creating a new array for the images

function ParseImages(imageInput:XML):void {
    var imageChildren:XMLList = imageInput.ImageInfo.FileName;
    for each (var imageElement:XML in imageChildren) {
                trace(imageElement);            
                imageArray.push(imageInput.ImageInfo.FileName);
        }
    }

```
