# I can't get the xml into an array. whats wrong?

**URL:** <https://forum.kirupa.com/t/i-cant-get-the-xml-into-an-array-whats-wrong/219464>\
**Category:** flash\
**Created:** [March 16, 2007, 5:32pm UTC](https://forum.kirupa.com/t/i-cant-get-the-xml-into-an-array-whats-wrong/219464 "2007-03-16T17:32:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesainter](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@thesainter](https://forum.kirupa.com/u/thesainter)\
**Post date:** [March 16, 2007, 5:32pm UTC](https://forum.kirupa.com/t/i-cant-get-the-xml-into-an-array-whats-wrong/219464/1 "2007-03-16T17:32:17Z")

</div>

So why doesn’t this work?  
I’m lost. adding a array manual works…  
.

//Array with information seems to work but xml not.  
//memberInfo = [[“this works”]];

\_root.input\_mc.swapDepths(100000);  
\_root.faq.swapDepths(1000001);  
\_root.faq.\_visible = false;

var memberInfo = new Array();  
var my\_xml = new XML();  
my\_xml.ignoreWhite = true;  
my\_xml.load(“inputData.xml”);  
my\_xml.onLoad = function(success)

{  
if (success) {  
xmlNode = this.firstChild;  
for (var i = 0; i \< this.firstChild.childNodes.length; i++) {  
memberInfo.push(xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue);  
txtArray.push(xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue);  
}  
}

};

//Starting x & y values  
var xPos = 150;  
var yPos = 60;  
//For loop to attach our container movieclip and pass the array information  
for (i=0; i\<memberInfo.length; i++) {  
//attach the container clip  
mijnmov = attachMovie(“container”, “new”+i, i, {\_x:xPos, \_y:yPos});  
//increase the y postion each time  
yPos += this[“new”+i].\_height+5;  
//add the information  
this[“new”+i].name.text = memberInfo\*[0];  
this[“new”+i].interest.text = memberInfo\*[1];  
this[“new”+i].link = memberInfo\*[2];  
trace(mijnmov.\_target);  
mijnmov.width = 800;  
mijnmov.height = 600;  
mijnmov.speed = Math.round(Math.random()\*2)+1;  
//initial positions  
mijnmov.x = Math.random()\*mijnmov.width;  
mijnmov.y = Math.random()\*mijnmov.height;  
mijnmov.\_x = mijnmov.x;  
mijnmov.\_y = mijnmov.y;  
mijnmov.x\_new = Math.random()\*mijnmov.width;  
mijnmov.y\_new = Math.random()\*mijnmov.height;  
}
