# XML and Flash

**URL:** <https://forum.kirupa.com/t/xml-and-flash/293890>\
**Category:** Uncategorized\
**Created:** [August 5, 2009, 1:15pm UTC](https://forum.kirupa.com/t/xml-and-flash/293890 "2009-08-05T13:15:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Offrenbaruna](https://avatars.discourse-cdn.com/v4/letter/o/7cd45c/32.png) [@Offrenbaruna](https://forum.kirupa.com/u/Offrenbaruna)\
**Post date:** [August 5, 2009, 1:15pm UTC](https://forum.kirupa.com/t/xml-and-flash/293890/1 "2009-08-05T13:15:37Z")

</div>

Hello everyone, I have a problem loading my data from my XML

this is my XML

```php
<?xml version="1.0" encoding="utf-8"?>
<gallery>    
    <image imgBigEx="img_big_01.jpg" thumEx="img_thum_01.jpg" />
    <image imgBigEx="img_big_02.jpg" thumEx="img_thum_02.jpg" />
    <image imgBigEx="img_big_03.jpg" thumEx="img_thum_03.jpg" />
    <!-- THUMBNAIL -->
    <image imgBigIn="img_big_01.jpg" thumIn="img_thum_01.jpg" />
    <image imgBigIn="img_big_02.jpg" thumIn="img_thum_02.jpg" />
    <image imgBigIn="img_big_03.jpg" thumIn="img_thum_03.jpg" />            
</gallery>

```

and here is my AS

```php

var bigImg:Array = new Array();
var modelNum;
var whichImgBig;
var whichThum;
var whichGallery = "photoExterior";
var switchGallery;
var switchGalleryThum;
var whichModelBigEx;
var whichModelBigThumEx;
var whichModelBigIn;
var whichModelThumIn;

var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success){
    var allTheModels = myXML.firstChild.childNodes;
    for (var i=0; i<allTheModels.length; i++) {
        var modelNum = allTheModels.length;
        vawhichModelBigEx = allTheModels*.attributes.imgBigEx;
        whichModelBigThumEx = allTheModels*.attributes.thumEx;
        whichModelBigIn = allTheModels*.attributes.imgBigIn;
        whichModelThumIn = allTheModels*.attributes.thumIn;
        //trace (modelNum)
        trace(whichModelBigEx)
        trace(whichModelBigThumEx)
        trace(whichModelBigIn)
        trace(whichModelThumIn)
        if (success){
        //trace("XML Fully Loaded")
        }
    }
}
myXML.load("gallery.xml");

```

My problem is that My AS does not read all the attributes in one shot from my XML and ignores or trace some undefined values.

The thing is that I want to trace all the element from my XML in other word all the children from my root and I don’t know how to do it or what I’m doing wrong !

A little help please !
