Help Using XML in Flash 8

Hey Guy, this is my first post on this forum. My friend and I decided to try and teach ourselves Flash recently and have hit a bit of a road block, we want to be able to search using a text field in Flash that would search through an XML file and display all the corresponding child Nodes. Heres what I’ve got but it ain’t workin! :

Heres My XML: (For now just want to be able to search by course code)

<course>
<course_code code= “DGA001”>
<course_name>Course Name: Physics</course_name>
<pts_rqd>Points Required: 435</pts_rqd>
<duration>Duration: 4 Years</duration>
</course_code>
<dga002>
<course_name>Course Name: Civil Engineering</course_name>
<pts_rqd>Points Required: 460</pts_rqd>
<duration>Duration: 4 Years</duration>
<course_code>Course Code: dga002</course_code>
</dga002>
<dga003>
<course_name>Course Name: Business Computing</course_name>
<pts_rqd>Points Required: 360</pts_rqd>
<duration>Duration: 3 Years</duration>
<course_code>Course Code: dga003</course_code>
</dga003>
</course>]

Heres my Action Script:

function processSearch(){
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“course.xml”);
var Result;
Result:String=(this.firstChild.attributes.code);
if (Result=Search){
var Result2;
Result2:String=(firstChild.ChildNode[0].ChildNode[0].nodeValue)
Output=Result2;
}
else
{
Output=“It Didn’t Work!”
};
}

All help and Constructive criticism is welcomed!