I want to get the value of "passed" under Course/CoreData/Status and assign it to a PHP variable. Here's my data stored in a mysql database field:

PHP Code:
<Course>
  <
LearnerID value="tim@mail.net"/>
  <
Result>
    <
CoreData>
      <
Status value="passed"/>
      <
Location value="1"/>
        </
CoreData>
  </
Result>
</
Course
I've tried the following code as a start but to no avail:

PHP Code:
$sql "SELECT * FROM exam";
$q     mysql_query($sql) or die(mysql_error());

while(
$row=mysql_fetch_array($q)){
    
$Filedata=$row["Filedata"];
}

$xml simplexml_load_string($Filedata); 
Please help put an end to my two days of misery trying to figure this out

Thanks,

Tim