Exemplo n.º 1
0
 static function LeeArchivo($archivo)
 {
     // Crear el objeto XML con la fuente de datos
     //$url = "http://portal.infowork.es/export/AP3YSJBJCOOBBWK2LGJF/listado.asp?l=sergio.perez@albatronic.com&p=AyH73J8Q&type=2&zip=0";
     //$filename = "infowork.xml";
     $str = file_get_contents($archivo);
     //$str=file_get_contents($url);
     //file_put_contents($filename, $str);
     $str = preg_replace("/\\<\\!\\[CDATA\\[(.*?)\\]\\]\\>/ies", "'[CDATA]'.base64_encode('\$1').'[/CDATA]'", $str);
     self::$xml = new SimpleXMLElement($str);
 }