PHP: De XML a Array (pasando por JSON)

Imagen de Alessandro Mascherpa

Método rápido para transformar un fichero XML en un array PHP:

<?php
$xmlstr
= file_get_contents("data/titulaciones/titulaciones.xml");
$xml = simplexml_load_string($xmlstr);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
?>

REF:
- http://www.php.net/manual/es/book.simplexml.php#105330