# Problem retrieving NodeValues, getting a big 'Null' each time

**URL:** <https://forum.kirupa.com/t/problem-retrieving-nodevalues-getting-a-big-null-each-time/236281>\
**Category:** Uncategorized\
**Created:** [August 19, 2007, 12:09pm UTC](https://forum.kirupa.com/t/problem-retrieving-nodevalues-getting-a-big-null-each-time/236281 "2007-08-19T12:09:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![camoconnell\_com](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/camoconnell_com/32/3655_2.png) [@camoconnell\_com](https://forum.kirupa.com/u/camoconnell_com)\
**Post date:** [August 19, 2007, 12:09pm UTC](https://forum.kirupa.com/t/problem-retrieving-nodevalues-getting-a-big-null-each-time/236281/1 "2007-08-19T12:09:11Z")

</div>

Hey there,

this is my first attempt at parsing xml into flash from scratch, i’ve read through most of senocular’s tut on kirupa so i’ve got a loose grasp of the fundamentals, i just need help filling in the gray areas.  
this is the xml i’m attempting to parse;

```auto
<stageitems>
    <stage> 
        <homehead>Blah Blah</homehead>
        <homebody>Blah Blah</homebody>
        <homefooter>Blah Blah</homefooter>
    </stage>
// **the 'stage' node below here repeats three more times** 
    <stage title="RENEWAL" path="images/renewal" >
        <item image="LHimage_1.png">
            <description> The first left hand image of Renewal</description>
        </item>
        <item image="LHimage_2.png">
            <description> The Second left hand image of Renewal</description>
        </item>
        <item image="RHimage_1.png">
            <description> The first right hand image of Renewal</description>
        </item>
        <item image="RHimage_2.png">
            <description> The Second right hand image of Renewal</description>
        </item>
    </stage>
<stageitems>

```

And heres what i’ve played with just to retrieve the first ‘stage’ nodeValues, but i just can’t get it to click ;  
[AS]  
var xml:XML = new XML();  
xml.ignoreWhite = true;  
xml.onLoad = function(success) {  
if (success) {  
var stage = this.firstChild.childNodes;  
numOfStages = stage.length;  
for (var i = 0; i\<numOfStages; i++) {  
var homehead = stage\*.firstChild;  
var homebody = stage\*.childNodes[1];  
var homefooter = stage\*.childNodes[2];  
castMC.StagesWrap.homeMC.homeHeader\_txt.text = homehead.firstChild.nodeValue;  
castMC.StagesWrap.homeMC.homeBody\_txt.text = homebody.firstChild.nodeValue;  
castMC.StagesWrap.homeMC.homeFooter\_txt.text = homefooter.firstChild.nodeValue;  
}  
} else {  
castMC.StagesWrap.homeMC.homeFooter\_txt.text = “Error loading XML file”;  
}  
};  
// load the xml  
xml.load(“headerData.xml”);  
[/AS]

it just returns, null :jail: and i just can’t figure out why

thanks  
Cam
