Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/09/2011, 07:30
SeNdEr2003
 
Fecha de Ingreso: agosto-2003
Mensajes: 906
Antigüedad: 20 años, 7 meses
Puntos: 3
Problema con simplexml

Buenas

Estoy tratando de parsear con simplexml y obtengo esto:

Serializador::deserialize() must be an instance of SimpleXMLElement, boolean given, called in

Como hago para saber lo que tengo mal? esta es la funcion:

Código PHP:

 
static public function deserializeFromFile($filepathEntityManager $em null)
    {
        
Serializador::$objectCache = array();
        
Serializador::$oidCache = array();
                
//echo getcwd();
        
$rootElement simplexml_load_file($filepath);
        return 
self::deserialize($rootElement$em);
    }

    static public function 
deserializeFromString($xmlEntityManager $em null)
    {
        
Serializador::$objectCache = array();
        
Serializador::$oidCache = array();
               
        
$rootElement simplexml_load_string($xml);
        return 
self::deserialize($rootElement$em);
                
    }

    static private function 
deserialize(SimpleXMLElement $rootElementEntityManager $em null