:: XML Node Value Query ::

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;
} else {
trace(“Error loading XML file.”);

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”>

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…