# XML Problem

**URL:** <https://forum.kirupa.com/t/xml-problem/152046>\
**Category:** flash\
**Created:** [June 20, 2005, 8:09pm UTC](https://forum.kirupa.com/t/xml-problem/152046 "2005-06-20T20:09:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoirWD](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@NoirWD](https://forum.kirupa.com/u/NoirWD)\
**Post date:** [June 20, 2005, 8:09pm UTC](https://forum.kirupa.com/t/xml-problem/152046/1 "2005-06-20T20:09:03Z")

</div>

# Hi fellow Flashers, I just wanted to get some help with XML manipulation.

I have the following code:  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
nDates = [];  
nTitles = [];  
nInfo = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
nDates\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
nTitles\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
nInfo\* = xmlNode.childNodes\*.childNodes[2].firstChild.nodeValue;  
}  
} else {  
trace(“File not Loaded”);  
}  
trace(total);  
trace(nDates[1]);  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“News.xml”);

# ============= And, the following XML file: \<?xml version=“1.0” encoding=“iso-8859-1”?\> \<News\> \<NewsBlock\> \<nDate\>06-20-2005\</nDate\> \<nTitle\>Got My iMac\</nTitle\> \<Info\>My iMac Arrived, I’m so excited.\</Into\> \</NewsBlock\> \<NewsBlock\> \<nDate\>06-17-2005\</nDate\> \<nTitle\>Site Launched\</nTitle\> \<Info\>Finally got my website up and running…its about time.\</Into\> \</NewsBlock\> \</News\>

Now, I’ve tried getting each node with the ‘for’ loop above, but it only extracts only one node.  
Any Solutions?  
Thanks for all your time.
