tengo un problema al tratar de levantar info de un xml
aca les dejo el xml sería algo así:
<?xml version="1.0" encoding="iso-8859-1" ?> 
<galleries>
   <site name="vehiculos">
      <gallery>
           <name>Motos</name> 
         <url>
http://www.masmotos.com.ar</url> 
           <type>Pics</type> 
        </gallery>
      <gallery>
           <name>Lanchas y Nautica</name> 
         <url>
http://www.lanchas.com</url> 
           <type>Pics</type> 
        </gallery>
          <gallery>
           <name>Autos Sports</name> 
         <url>
http://www.autos.com</url> 
           <type>Pics</type>
        </gallery>
     </site>
     .
     .
     .
     .
     .
  </galleries>
y mi codigo en php es así:
<?php
// inicializamos algúnas variables auxiliares 
$tag_actual = ""; 
$contenido = "";
$actual_site = "";
$ultimo_site = "";
//Url del xml
$url_xml = "http://www.unxml.com";
$parser = xml_parser_create();
xml_set_element_handler($parser, "tag_abre", "tag_cierra"); 
xml_set_character_data_handler($parser, "tag_contenido");
function tag_abre($parser, $nombre, $atributos){ 
   global $tag_actual, $actual_site , $ultimo_site ;
   $tag_actual = $nombre;
   if ($nombre == "SITE"){
      $actual_site = $atributos[name]; 
      if ($ultimo_site == ""){
         $ultimo_site = $actual_site ;
      }
   }
}
function tag_contenido($parser, $valor){ 
   global $contenido; 
   $contenido .= $valor; 
}
function tag_cierra($parser, $nombre){ 
global $tag_actual, $contenido; 
$contenido = trim($contenido); 
if ($tag_actual == "SITE"){
   if ($actual_site != $ultimo_site){
      echo "<hr><br>";
      echo "$contenido<br>";
   }
}
switch($nombre){ 
   case "NAME": 
      print "Nombre: $contenido - "; 
   break; 
   case "URL": 
      print "URL: $contenido<br>\n"; 
   break; 
   default:
   break;
} 
$tag_actual = ""; 
$contenido = ""; 
}
if(!xml_parse($parser, $url_xml, true)){ 
   die("Error en la linea ".xml_get_current_line_number($parser). 
    ": ".xml_error_string(xml_get_error_code($parser))); 
}
?>
=> El error que me da es este:
Error en la linea 1: not well-formed (invalid token)
Pero no puedo darme cuenta que estoy haciiendo mal, si alguien me puede ayudar se lo agradezco.