# XML image/info loading

**URL:** <https://forum.kirupa.com/t/xml-image-info-loading/136941>\
**Category:** Uncategorized\
**Created:** [February 9, 2005, 5:02pm UTC](https://forum.kirupa.com/t/xml-image-info-loading/136941 "2005-02-09T17:02:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![livingeachday](https://avatars.discourse-cdn.com/v4/letter/l/d78d45/32.png) [@livingeachday](https://forum.kirupa.com/u/livingeachday)\
**Post date:** [February 9, 2005, 5:02pm UTC](https://forum.kirupa.com/t/xml-image-info-loading/136941/1 "2005-02-09T17:02:15Z")

</div>

hi there,

im working on an XML based image/text loading movie based on the tutorial on this site. things are working great, but im having a little trouble with two things. i should probably put the XML file here to put things in context.

now if you look below, there are a bunch of group nodes, with description nodes nestled inside. i want to be able to read any existing description values into an array, but i can only seem to extract the value for the first description tag with a literal

itemDesc\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;

anyone tell me how to get it from how ever many description nodes there are in the doc?

#2. I want to extract the values from the image tags only within whatever group is loaded at the time, into a single array. anyone know how to do this?

this targeting stuff is so confusing.

## thanks in advance! tom

XML file:  
\<images\>  
\<group name=“item 1” id=“0”\>  
\<description\>this is the description for 1\</description\> // this one  
\<image id=“0”\>images/image\_1.jpg\</image\>  
\<image id=“1”\>images/image\_2.jpg\</image\>  
\</group\>

\<group name=“item 2” id=“1”\>  
\<description\>this is the description for 2\</description\>  
\<image id=“0”\>images/image\_3.jpg\</image\>  
\<image id=“1”\>images/image\_4.jpg\</image\>  
\<image id=“2”\>images/image\_5.jpg\</image\>  
\</group\>

\<group name=“item 3” id=“2”\>  
\<description\>this is the description for 3\</description\>  
\<image id=“0”\>images/image\_6.jpg\</image\>  
\<image id=“1”\>images/image\_7.jpg\</image\>  
\<image id=“2”\>images/image\_1.jpg\</image\>  
\</group\>

\</images\>
