Permitting local runs only. Source code: <?php 
if (isset($_SERVER['REMOTE_ADDR'])) {
    echo 
"Permitting local runs only. Source code:\n";
    
highlight_file(__FILE__);
    exit;
}

if (!
file_exists("data.serialized")) {
    echo 
"Missing data.serialized, trying to parse from data.xml... ";

    if (!
file_exists('data.xml')) {
        die(
"Missing data.xml.\n");
    }

    require(
'xml2arrayparser.php');
    
$dom = new xmlToArrayParser(file_get_contents('data.xml'));
    
$data $dom->array

    if (
$dom->parse_error) {
        die(
'Error: ' $dom->get_xml_error()); 
    }

    
$fid fopen('data.serialized''w');
    
fwrite($fidgzcompress(serialize($data)));
    
fclose($fid);

    unset(
$dom);

    echo 
"Done!\n";
}

if (!
file_exists('events.serialized')) {
    echo 
"Missing events.serialized, trying to parse from data.serialized... ";

    
$data unserialize(gzuncompress(file_get_contents('data.serialized')));

    
$scheduleversion $data['schedule']['version'];

    foreach (
$data['schedule']['day'] as $day=>$daydata) {
        
//echo "Day $day:\n";
        
foreach ($daydata['room'] as $room) {
            
//echo "  " . $room['attrib']['name'] . ":\n";
            
foreach ($room['event'] as $event) {
                
$ev = [];
                
$ev['room'] = $room['attrib']['name'];
                
$ev['day'] = $day;
                foreach (
$event as $key=>$val) {
                    if (
$key == 'persons' && isset($val['person'])) {
                        
$ev['speakers'] = [];
                        foreach (
$val['person'] as $person) {
                            if (
is_numeric($person)) {
                                
$ev['speakers'][$person] = true;
                            }
                            else if (
is_string($person)) {
                                
$ev['speakers'][$person] = $person;
                            }
                            else if (isset(
$person['id'])) {
                                
$ev['speakers'][$person['id']] = true;
                            }
                            else {
                                if (!isset(
$person['attrib'])) { print_r($person); exit; }
                                
$ev['speakers'][$person['attrib']['id']] = $person['cdata'];
                            }
                        }
                    }
                    else {
                        
$ev[$key] = $val;
                    }
                }
                
$events[] = $ev;
            }
        }
    }

    
$events['schedule-version'] = $scheduleversion;

    
$fid fopen('events.serialized''w');
    
fwrite($fidgzcompress(serialize($events)));
    
fclose($fid);

    echo 
"Done!\n";
}

$events unserialize(gzuncompress(file_get_contents('events.serialized')));

if (!
$events) {
    echo 
"Error decoding events.\n";
}

foreach (
$events as $event) {
    if (
$event['language'] != 'de' && $event['language'] != 'en') {
        
print_r($event);
    }
}