Look at this:
$sxe = new SimpleXMLElement($xmlstr);
echo 'Agent | Code | Name'.PHP_EOL;
foreach ( $sxe->Agent as $agent )
{
$attr = $agent->attributes();
foreach ( $agent->Property as $property )
{
echo $attr['ID'].' | '.$property->Code.' | '.$property->Name.PHP_EOL;
}
}