# Display several childNodes in text field?

**URL:** <https://forum.kirupa.com/t/display-several-childnodes-in-text-field/71666>\
**Category:** programming\
**Created:** [November 28, 2004, 3:43am UTC](https://forum.kirupa.com/t/display-several-childnodes-in-text-field/71666 "2004-11-28T03:43:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyberious](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@Cyberious](https://forum.kirupa.com/u/Cyberious)\
**Post date:** [November 28, 2004, 3:43am UTC](https://forum.kirupa.com/t/display-several-childnodes-in-text-field/71666/1 "2004-11-28T03:43:59Z")

</div>

I just can’t figure it out within the Actionscript: How can I display an unknown list of childNodes (from my xml file) in a single text area? I want to be able to just edit my xml file with new content, and have the flash file automatically update.  
I am trying to create a resources page, where I can display links (“url”) under specific headings (“name”).

I have the following AS code so far working properly, but it doesn’t display the next childNode:

function loadXML(loaded) {  
if (loaded) {  
\_root.link =  
this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;  
\_root.url =  
this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;  
name\_txt.text = \_root.link;  
url\_txt.text = \_root.url;  
} else {  
trace(“file not loaded!”);  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“resources.xml”);

My XML file:

\<?xml version=“1.0”?\>

\<resources\>  
\<link\>  
\<name\>My Category Heading\</name\>  
\<url\>[http://www.somewebsite.com](http://www.somewebsite.com)\</url\>  
\<url\>[http://www.anotherwebsite.com](http://www.anotherwebsite.com)\</url\>  
\</link\>  
\</resources\>

Besides having to edit the XML file to display clickable urls (will be using CDATA), how do I change the AS in Flash to display as many \<url\>'s as I need?

thanks!
