# XML question

**URL:** <https://forum.kirupa.com/t/xml-question/220692>\
**Category:** Uncategorized\
**Created:** [March 28, 2007, 11:49am UTC](https://forum.kirupa.com/t/xml-question/220692 "2007-03-28T11:49:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![the\_artdirector](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/the_artdirector/32/2771_2.png) [@the\_artdirector](https://forum.kirupa.com/u/the_artdirector)\
**Post date:** [March 28, 2007, 11:49am UTC](https://forum.kirupa.com/t/xml-question/220692/1 "2007-03-28T11:49:58Z")

</div>

Hello guys!  
I have the following xml file:

```auto
<?xml version="1.0" encoding="UTF-8"?>
    <images>
      <pic>
        <image>kingston/king01.jpg</image>
        <caption>The first image!</caption>
      </pic>
      <pic>
        <image>kingston/king02.jpg</image>
        <caption>The second image</caption>
      </pic>
      <pic>
        <image>kingston/king03.jpg</image>
        <caption>The third image</caption>
      </pic>
    </images>

```

And below is my script:

```auto
var testXml:XML = new XML();
testXml.ignoreWhite = true;
testXml.load("photos.xml");
testXml.onLoad = function(success) {
    if (success) {
        var k = this.firstChild.firstChild.childNodes*.childNodes[0];
        for (var i:Number = 0; i<this.firstChild.childNodes.length; i++) {
            duplicateMovieClip(emp, "king"+i, this.getNextHighestDepth());
            var e = eval("king"+i);
            e._x = e._width;
        }
        loadMovie(k, e);
    }
};

```

I know that it contains errors, I need to load the images that are in kingstone folder, and i need to place them next to each other. how can i do that?  
another question, is there a way to load the images in a certain folder, that counts the files and loads them? i mean if the clients uploads some images from in kingstone folder can i count the images and load them?

thanks in advance  
Rony
