# XML to Array problem

**URL:** https://forum.kirupa.com/t/xml-to-array-problem/190364
**Category:** Uncategorized
**Created:** [June 11, 2006, 12:55am UTC](https://forum.kirupa.com/t/xml-to-array-problem/190364 "2006-06-11T00:55:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bear](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@bear](https://forum.kirupa.com/u/bear)
#### Post date: [June 11, 2006, 12:55am UTC](https://forum.kirupa.com/t/xml-to-array-problem/190364/1 "2006-06-11T00:55:26Z")

</div>

\*\*XML to Array problem.  
\*\*   
I am unsure of why I am unable to populate an array with the proper information. For a minute, this was working, but all of a sudden, it did not. I did a load and it did not work after I switched it over to an .as file and called it.

Please assist.

ActionScript

```
Quote:

```

xmlData.onLoad = function(success:Boolean)  
{

```
if(success)
{
    xmlData.ignoreWhite = true;
    var xmlRoot:XMLNode = xmlData.firstChild;
    
    arrTemp = xmlRoot.childNodes;
    
    trace("Data: 

```

## " + xmlData + "

## "); trace("Root: " +xmlRoot.childNodes+ "

");

```
    trace("Number of Photos here:"+ arrTemp.length + "

```

* * *

");  
trace(“ok”);  
}else{

```
    trace("no");
    
}

```

}

XML  
Quote:  
\<pictures\>

```
&lt;pic num="1" desc="I could fight anybody with this wasted smile alone!" title="Smiley!"&gt;1.jpg&lt;/pic&gt;

```

\<pic num=“2” desc=“Stylus and Glenn Butt cheesing for Nurina. I’m more tired than you!” title=“Alpha/Zero 3 Bros.”\>2.jpg\</pic\>

```
&lt;pic num="3" desc="Nurina and Glenn Butt :D. It&apos;s down there! Yeah there! I&apos;ll go get it!" title="Beauty and the Butt!"&gt;3.jpg&lt;/pic&gt;

```

\<pic num=“4” desc=“Jorge, Nurina’s crew, and Pablo in the background, and…he’s trying to fit in! Watch out!” title=“Super Stalker Pablo”\>4.jpg\</pic\>

\</pictures\>

```
	 	 		 		 		 	 	   	 	 	 		 			 				__________________
```
