'; $xmldoc = simplexml_load_string($xmlstr); print_r($xmldoc); $current_weather = $xmldoc->current_weather; echo $current_weather->temperature->current->attributes()['value'][0] . "\r\n"; echo $current_weather->humidity->attributes()['value'][0] . "\r\n"; ?>