I agree that using php's simple xml parser is the way to go with this one.
You can make your life easy here using the xpath
method of extracting data from the xml.
There's an xpath tutorial here: http://www.w3schools.com/xpath/
And php documentation for it here: http://www.php.net/manual/en/simplexmlelement.xpath.php
Try this out
<?php
/*
Get the file with CURL
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'ftp://ftp2.bom.gov.au/anon/gen/fwo/IDV10753.xml');
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,true);
$xml_data = curl_exec($curl_handle);
curl_close($curl_handle);
*/
/*
Open the file locally
*/
$xml_data = file_get_contents("weather.xml");
$xml = simplexml_load_string($xml_data);
$result = $xml->xpath("//area[@description='Swan Hill']/forecast-period");
date_default_timezone_set('America/New_York');
foreach ($result as $day) {
//print_r($day);
$day_of_the_week = date("l", strtotime($day["start-time-local"])); //start-time-local is an attribute of a result, so use the [] syntax
$forecast = $day->text; //text is a child node, so use the -> syntax
printf("%s: %s\n", $day_of_the_week, $forecast);
}
?>
EDIT More illustrative example