I'm not getting the values out of the nodes from a feed I have. What is missing from this code? I've done a few tutorials on xml and even was able to modify them and get the expected results, but this is my first from scratch...

Below is the script, and below that is the first "item" from the xml feed I'm using.

I've added traces to see where I'm at. It passes over the traces in the fuction dealing with nodeValues and goes right on to display the text one, so I know the function is getting called correctly....thanks for any help from anyone!

---------------------------------------

// loop through
function loop (xml) {
trace("loop.1");
trace(xml.firstChild.nodeValue);
trace(xml.nextSibling.nodeValue);
trace(xml.nextSibling.nodeValue);


if (xml.firstChild.hasChildNodes) {
childNum = xml.firstChild.childNodes.length;
trace (childNum);
trace ("done");
} else {
trace ("no childNodes detected");
}

trace (xml.childNodes[0].childNodes);

}


// create new XML object

xmlObj = new XML();
trace("1");
xmlObj.load("stories.xml");
trace("2");
xmlObj.ignoreWhite = true;
trace("3");
loop(xmlObj);




---------------------------------------
<?xml version="1.0"?>
<NASCAR>
<date>Friday, 04 May 01, 03:57:39 PM EDT</date>
<item>
<page>Motor Sports</page>
<headline><![CDATA[PONTIAC 400 QUALS]]></headline>
<link>http://www.nascar.com/RACECAST/winston/</link>
<teaser_text><![CDATA[If you don't have FX, NASCAR.com is the place to be this weekend. Catch all the action on RaceCast! Winston Cup Bud Pole Qualifying is now under way.<br>]]></teaser_text>
</item>
<item>
<page>Motor Sports</page>
<headline><![CDATA[Fans without FX out of luck Saturday night]]></headline>
<link>http://www.nascar.com/2001/NEWS/cnnsi/05/03/waag_cnnsi/index.html</link>
<image_url>http://www.nascar.com/2001/NEWS/cnnsi/05/03/waag_cnnsi/sittingdown_medium.jpg</image_url>
<teaser_text><![CDATA[As hard as it is to understand FOX's logic in relegating one of the cooler races to a secondary channel, there's little question that the race will happen.

]]></teaser_text>
</item>