Help with flash & xml

Hi,

Im building a flash app to retrieve XML data which depends on what a user searches for.

The following as3 code places an input field and submit button which allows a user to type in a postcode into the input box and click search and what should be returned in a list of all the properties that have that postcode.


import fl.controls.Label;
import fl.controls.TextInput;
import fl.controls.Button;

var postcodeLabel:Label = new Label();
var postcodeTi:TextInput = new TextInput();
var tf:TextFormat = new TextFormat();
var submitBtn:Button = new Button();

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();

xmlLoader.addEventListener(Event.COMPLETE, LoadXML);

xmlLoader.load(new URLRequest("http://www.kingsestateagents.com/site/go/api/search"));

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

addChild(postcodeLabel);
addChild(postcodeTi);
addChild(submitBtn);

tf.font = "Georgia";
tf.color = 0x0000CC;
tf.size = 16;

postcodeLabel.text = "Postcode: "
postcodeLabel.setSize(100, 25);
postcodeLabel.move(90,100);
postcodeLabel.setStyle("textFormat", tf);
postcodeTi.move(160, 100);
postcodeTi.setSize(200, 25);
postcodeTi.setStyle("textFormat", tf);
submitBtn.move(160,150);
submitBtn.setSize(200, 25);
submitBtn.label= "submit";

submitBtn.addEventListener(MouseEvent.CLICK, Search);

function Search(xml:XML):void
{
    var propertyList:XMLList = xml.property.address.(postcode == postcodeTi.text);
    trace(propertyList.toString());
}

However, this doesn’t seem to happen.
Instead an error is returned.

Ive never worked with flash and xml before so just taken the above xml bits from online websites but cant get it working.

Just wondering whats wrong with it?

Thank you!