<?php
header('Content-type: text/xml');

$_identfile = fopen("/tmp/identification.xml", "r") or die("Unable to open file!");
$_flag = false;
while (!feof($_identfile)) {
    $_line = fgets($_identfile);
    if (!$_flag && strpos($_line, "xsi:schemaLocation=")) {
        $_flag = true;
        echo '<LXIDevice xmlns="http://www.lxistandard.org/InstrumentIdentification/1.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.lxistandard.org/InstrumentIdentification/1.0
            http://'.$_SERVER["SERVER_ADDR"].'/lxi/identificationSchema">';
    } else {
        echo $_line;
    }
}
fclose($_identfile);
?>
