# Need help with displaying xml in flash tutorial

**URL:** <https://forum.kirupa.com/t/need-help-with-displaying-xml-in-flash-tutorial/132077>\
**Category:** Uncategorized\
**Created:** [December 22, 2004, 7:45pm UTC](https://forum.kirupa.com/t/need-help-with-displaying-xml-in-flash-tutorial/132077 "2004-12-22T19:45:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan\_o](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dan\_o](https://forum.kirupa.com/u/dan_o)\
**Post date:** [December 22, 2004, 7:45pm UTC](https://forum.kirupa.com/t/need-help-with-displaying-xml-in-flash-tutorial/132077/1 "2004-12-22T19:45:15Z")

</div>

Just got through with the “Displaying XML in Flash” tutorial and it was very easy. I took the XML document on the tutorial and created more childNodes within the parent node. The problem is that I cannot get the actionscript to display text in the text window beyond the first child node.

I noticed in the tutorial [http://www.kirupa.com/developer/actionscript/xmldataflash.htm](http://www.kirupa.com/developer/actionscript/xmldataflash.htm) that it tells how to get other data from the first child node but not the second.

Please help. I’m stuck. I’ve included a copy of the XML and a copy of the actionscipt.  
XML:  
\<?xml version=“1.0”?\>

\<flashcopy\>  
\<intro\>  
\<headline\>Do You Love Football, Basketball and Baseball?\</headline\>  
\<body\>Your search is over – ajcsportsplus delivers all the local sports news you want in one convenient package. Falcons, Dawgs, Tech. No one else does local college and professional football like the AJC.\</body\>  
\</intro\>

```
&lt;tech&gt;
	&lt;headlinetech&gt;Can Tech Do It Again? Join Their Road To The Final Four!&lt;/headlinetech&gt;
	&lt;bodytech&gt;Oft-criticized quarterback Reggie Ball will start against Syracuse, but how much he'll play probably depends on how well he plays.&lt;/bodytech&gt;
&lt;/tech&gt;

&lt;uga&gt;
	&lt;headline&gt;Bowl Practice Turns Competitive As Dogs Shake Off Rust&lt;/headline&gt;
	&lt;body&gt;Though UGA policy will not allow David Pollack's number to be retired, he could be fast-tracked into the school's Circle of Honor.&lt;/body&gt;
&lt;/uga&gt;

&lt;falcons&gt;
	&lt;headline&gt;Falcons Fever Going Around As Team's Fortunes rise&lt;/headline&gt;
	&lt;body&gt;Allen Rossum and Warrick Dunn are revved up after Saturday's win over Carolina, as are Falcons fans throughout the city.&lt;/body&gt;
&lt;/falcons&gt;

&lt;braves&gt;
	&lt;headlinebraves&gt;Could Betemit Bring Outfielder?&lt;/headlinebraves&gt;
	&lt;bodybraves&gt;These are your experts. The only place to get them online is at ajcsportsPlus. Talk back to our sports columnists--agree or disagree. You can't have this much fun anywhere else!&lt;/bodybraves&gt;
&lt;/braves&gt;

```

\</flashcopy\>

Actionscript:  
function loadXML(loaded) {  
if (loaded) {  
\_root.tech = this.firstChild.childNodes[1].childNodes[0].firstChild.nodeValue;  
\_root.body = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;  
headline.text = \_root.tech;  
body.text = \_root.body;  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“promotext.xml”);

Thanks.  
Dan
