# AS3 and XML filtering

**URL:** <https://forum.kirupa.com/t/as3-and-xml-filtering/251716>\
**Category:** flash\
**Created:** [February 11, 2008, 11:46pm UTC](https://forum.kirupa.com/t/as3-and-xml-filtering/251716 "2008-02-11T23:46:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lpimaging](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@lpimaging](https://forum.kirupa.com/u/lpimaging)\
**Post date:** [February 11, 2008, 11:46pm UTC](https://forum.kirupa.com/t/as3-and-xml-filtering/251716/1 "2008-02-11T23:46:50Z")

</div>

Hello All,  
This is my first post on this forum so I hope that you guys can help. I’m trying to filter some data from a XML file but flash keeps telling me that my child node is not available. I have checked the file several times with no luck. This is my first time using XML with AS3 so any help would be appreciated. This is still a work in progress but I’d like to be able to filter this data. I don’t know if the XML file is too large or what. Here is the AS:

import fl.containers.ScrollPane;  
import fl.controls.TextArea;  
var xmlLoader:URLLoader = new URLLoader();  
var xmlData:XML = new XML();

xmlLoader.addEventListener(Event.COMPLETE, LoadXML);

xmlLoader.load(new URLRequest(“[http://mainstreetlvnm.org/xmltest/AssetDatabase.xml](http://mainstreetlvnm.org/xmltest/AssetDatabase.xml)”));

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

function ParseProperties(propertyInput:XML):void {  
trace(“XML Output”);  
trace("------------------------");  
var addressArray = new Array()  
var authorList:XMLList = propertyInput.Properties.(Occupancy == “Vacant”).Physical\_x0020\_Address;  
trace(authorList)  
var yLoc:Number = 0  
var sp:ScrollPane = new ScrollPane();  
sp.setSize(335, 360);  
sp.move(195,13)  
var textSource:MovieClip = new MovieClip();

for (var i:int = 0; i \< authorList.length(); i++) {  
var authorElement:XML = authorList\*;  
var myTextArea:TextArea = new TextArea()  
myTextArea.setSize(300, 50);  
myTextArea.move(0, yLoc);  
textSource.addChild(myTextArea);

```
myTextArea.editable =false
myTextArea.text = authorElement	
yLoc = yLoc + 50
addressArray.push(authorElement);

```

//trace(authorElement);  
}  
sp.source = textSource  
addChild(sp);  
}
