# Displaying XML Data in Flash

**URL:** https://forum.kirupa.com/t/displaying-xml-data-in-flash/192131
**Category:** flash
**Created:** [June 26, 2006, 1:59pm UTC](https://forum.kirupa.com/t/displaying-xml-data-in-flash/192131 "2006-06-26T13:59:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Esq](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@Esq](https://forum.kirupa.com/u/Esq)
#### Post date: [June 26, 2006, 1:59pm UTC](https://forum.kirupa.com/t/displaying-xml-data-in-flash/192131/1 "2006-06-26T13:59:36Z")

</div>

Hi!

I saw a great tutorial here which tells how to get data from xml -file to flash. Now I have ran into a problem with it. I dont know how to get multiple news from a xml file. Ok ok…This might be easy for a pro but fer me its a killer :h:

So plz. If you can advice me how to get through this …

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

How I load multiple xml news? I have 10 news to get and all I get is one…If I try to do this the hardwaý = multiplying:  
\_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue; \_root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue; name\_txt.text = \_root.inventor; comment\_txt.text = \_root.comments;

And changing the node properties/values (All this in one frame) I get just one news and its the last one specified in the code _sigh_…So lost with this… I know there SHOULD be easier and better way to do this… help me :te:

Esq
