Need some help with calling xml nodes

hi, i worked on this code friday and had saved it as version 8, but when i got home i couldn’t open it. so…i tried to recreate it from memory, which is always a bad idea for a sleep-deprived mommy :wink:

here’s my actionscript code:

var blocks:Array = new Array(txt0,txt1,txt2);
var stories:Array = new Array();

var headlineXML:XML = new XML();
headlineXML.ignoreWhite = true;
headlineXML.onLoad = function(success){

if (success){


function parse() {
var broadcastXML = headlineXML.firstChild;
var storyNode = broadcastXML.childNodes;

for (var i=0; i<storyNode.childNodes.length; i++){

currStories = stories*;
currLead = storyNode.firstChild.childNodes[0];
currBody = storyNode.firstChild.childNodes[1];
currURL = storyNode.firstChild.childNodes[2];
currtxt = blocks*;

currtxt.htmlText = currLead.firstChild.childNodes.nodeValue[0]+"<br>"+currBody.firstChild.childNodes.nodeValu e[0]+"<br>"+currURL.firstChild.childNodes.nodeValue[0];

and here’s my xml doc structure:

<lead>This is Headline 1</lead>
<body>This is where you can add content that will appear under the first headline</body>
<URL><a href=""></a></URL>
<lead>This is Headline 2</lead>
<body>This is where you can add content that will appear under the second headline</body>
<lead>This is Headline 3</lead>
<body>This is where you can add content that will appear under the third headline</body>

any help would be appreciated…i’m getting nowhere and i need to get this well underway by the end of the weekend. i also need to load images and style the text, but for now i just want it to loop thru the text arrays properly. sigh and to show my text!