# Recursive XML

**URL:** <https://forum.kirupa.com/t/recursive-xml/307041>\
**Category:** Uncategorized\
**Created:** [March 26, 2010, 4:04pm UTC](https://forum.kirupa.com/t/recursive-xml/307041 "2010-03-26T16:04:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_osiris\_t](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@m\_osiris\_t](https://forum.kirupa.com/u/m_osiris_t)\
**Post date:** [March 26, 2010, 4:04pm UTC](https://forum.kirupa.com/t/recursive-xml/307041/1 "2010-03-26T16:04:40Z")

</div>

Hi.

I am trying to load a generated xml-string from php into Flash via AS3.  
(For reference, the xml may be found here: [http://pieceoflunacy.com/abydos/flash/PHP/000testing.php](http://pieceoflunacy.com/abydos/flash/PHP/000testing.php) )

The code I use is pretty obvious:

```auto
var xmlLoader:URLLoader = new URLLoader ;
			var xmlData:XML = new XML ;

			xmlLoader.addEventListener(Event.COMPLETE,LoadXML);
			xmlLoader.load(new URLRequest('http://pieceoflunacy.com/abydos/flash/PHP/000testing.php'));

			function LoadXML(e:Event):void {
				xmlData = new XML(e.target.data);
				trace(xmlData);
			}

```

All XML is traced correctly. But then I substitute

```auto
trace(xmlData);

```

with

```auto
trace(xmlData.phpDirectory);

```

.

I would now assume to get all children-phpDirectorys. But nothing is output, not even an error.

So, I wonder, whats the mistake? Can AS3-XML not parse nested elements of same type? Or did I miss anything?
