# Help to get a certain XML node

**URL:** https://forum.kirupa.com/t/help-to-get-a-certain-xml-node/318900
**Category:** flash
**Created:** [February 3, 2011, 3:16am UTC](https://forum.kirupa.com/t/help-to-get-a-certain-xml-node/318900 "2011-02-03T03:16:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![treeleaf20](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@treeleaf20](https://forum.kirupa.com/u/treeleaf20)
#### Post date: [February 3, 2011, 3:16am UTC](https://forum.kirupa.com/t/help-to-get-a-certain-xml-node/318900/1 "2011-02-03T03:16:57Z")

</div>

All,  
I currently have the following XML code:

```auto

<imagesGallery gallName="jbjects">
	<images imagesSmall="gallery/tfile_small_3_1.jpg" imagesBig="gallery/tfile_gall_3_1.jpg" imageTitle="This is a test1"/>
	<images imagesSmall="gallery/tfile_small_3_2.jpg" imagesBig="gallery/tfile_gall_3_2.jpg" imageTitle="This is a test1"/>
</imagesGallery>

```

I have this code to get how many image elements are in this:

```auto
var galleryLength:Number=MovieClip(root).program.websiteXML.settings.imagesPage.imagesGallery[MovieClip(root).gallery_category_num].images.length();

```

I got it from a template so I’m trying to work with it. This would trace two if I traced the galleryLength. If I change the code to just trace the following:

```auto
trace(MovieClip(root).program.websiteXML.settings.imagesPage.imagesGallery[MovieClip(root).gallery_category_num])

```

It will trace out my original XML. However, I’m trying to get the gallName. I tried to make the code:

```auto
trace(MovieClip(root).program.websiteXML.settings.imagesPage.imagesGallery[MovieClip(root).gallery_category_num].gallName)

```

That however didn’t trace anything. Any ideas how I can read the galleryname? Thanks in advance
