# Xml+ foto gallery

**URL:** <https://forum.kirupa.com/t/xml-foto-gallery/279866>\
**Category:** Uncategorized\
**Created:** [January 20, 2009, 3:51am UTC](https://forum.kirupa.com/t/xml-foto-gallery/279866 "2009-01-20T03:51:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lefonk](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@lefonk](https://forum.kirupa.com/u/lefonk)\
**Post date:** [January 20, 2009, 3:51am UTC](https://forum.kirupa.com/t/xml-foto-gallery/279866/1 "2009-01-20T03:51:35Z")

</div>

Hi all,  
i stucked in some problem.

I have an xml which looks like this

```auto

<gallerie naam="gallery1">
&#8722;
<gallery title="Some name" client="some client" intro="some intro.." cat="some category">
<image title="name 1">images/1.jpg</image>
<image title="name 2">images/2.jpg</image>
</gallery>
&#8722;
<gallerie naam="gallery2">
&#8722;
<gallery title="Some name2" client="some client2" intro="some intro..2" cat="some category"2>
<image title="name 3">images/variable3.jpg</image>
<image title="name 4">images/variable4.jpg.jpg</image>
</gallery>
</gallerie>

```

Because i have to use this format (because of cms), i can’t change a lot on it.

Now comes the reall problem: I want to load the first picture of every gallery. In this case  
i have to load ‘images/1.jpg’ and ‘images/variable3.jpg’.

But i dont understand the construction of the xml for parsing it.  
the actionscript part looks like this:

```auto

portfolio.onLoad = function()
{
    var nodes:Array = [COLOR=Red]this.firstChild.childNodes[/COLOR];
    for(var i=0;i<nodes.length;i++)
    {
        photo_thumbnail.push([COLOR=Red]nodes*.firstChild.childNodes.nodeValue[/COLOR]);
        
    }
    
}
portfolio.load("test/portfolio.xml");

```

I have to change the red part. Who can help me?  
[SIZE=1]\*  
For the ones who are curious how i would load the pictures.  
It is in a for loop:  
mcl.loadClip(photo\_thumbnail\*, this.firstPictureMC);\*[/SIZE]  
Thanks in advance!
