# :: XML Node Value Query ::

**URL:** <https://forum.kirupa.com/t/xml-node-value-query/244032>\
**Category:** flash\
**Created:** [November 13, 2007, 7:26pm UTC](https://forum.kirupa.com/t/xml-node-value-query/244032 "2007-11-13T19:26:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bumblepuppy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bumblepuppy/32/1225_2.png) [@bumblepuppy](https://forum.kirupa.com/u/bumblepuppy)\
**Post date:** [November 13, 2007, 7:26pm UTC](https://forum.kirupa.com/t/xml-node-value-query/244032/1 "2007-11-13T19:26:20Z")

</div>

Hi all you fluffy, fluffy beautiful peeps!

I’m using the following code to load XML into Flash:

[COLOR=DarkOliveGreen] var [COLOR=Purple]snapArray[/COLOR];

var snapsXML = new XML();  
snapsXML.ignoreWhite = true;  
snapsXML.onLoad = function(success) {  
if (success) {  
var snapAlbum = this.firstChild;  
[COLOR=Purple] snapArray[/COLOR] = snapAlbum.childNodes;  
resetScrollPane();  
loadSnapThumbnail(snapArray);  
} else {  
trace(“Error loading XML file.”);  
}  
};[/COLOR]

To load the following file:

[COLOR=DarkOliveGreen] \<?xml version=“1.0” ?\>  
\<snaps [/COLOR][COLOR=Red]albumName[/COLOR][COLOR=DarkOliveGreen]=“Example Album”\>  
\<[/COLOR][COLOR=Blue]snap[/COLOR][COLOR=DarkOliveGreen] snapName=“Snap 1” snapFileName=“snap\_1.jpg”\>  
\</snaps\>[/COLOR]

Which is all well and good and works a treat…

However I want to access the [COLOR=Red]albumName[/COLOR] node in Flash to retrieve the value therein… Now I realise that I can’t access this through the [COLOR=Purple]snapArray[/COLOR] as this only contains the [COLOR=Blue]snap[/COLOR] childNodes, but how do I access the value for the nodeName [COLOR=Red]albumName[/COLOR][COLOR=Black]…?[/COLOR][COLOR=Blue][COLOR=Black]

Can anyone please advise me further I feel like skinning myself and making a fluffy little pair of rabbitskin slippers!

Peace, love and flowers

The Bumblepuppy…  
[/COLOR][/COLOR]
