пример файла inf0.tpl
<html>
<head>
<script>
function loadXMLDoc(filename) {
if (window.ActiveXObject) {
xhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
else {
xhttp = new XMLHttpRequest();
}
xhttp.open("GET", filename, false);
try { xhttp.responseType = "msxml-document" } catch (err) { } // Helping IE11
xhttp.send(null);
return xhttp.responseXML;
}
document.addEventListener('DOMContentLoaded', function () {
var xml = loadXMLDoc("xml/city.xml"),
selCity = document.querySelector('#city'),
selStation = document.querySelector('#station2'),
i;
[].forEach.call(xml.querySelectorAll('city'), function (el) {
selCity.add(new Option(el.getAttribute('name'), el.getAttribute('name')))
})
selCity.addEventListener('change', function () {
selStation.options.length = 0 , i=0;
[].forEach.call(xml.querySelectorAll('city[name=' + this.value + '] > station2'), function (el) {
selStation.add(new Option(el.textContent, ++i));
})
})
})
</script>
</head>
<body>
<?php
echo "
<div class=selectind><select id=city><option selected>Россия_1</option></select></div></td>
<td>
<div class=selectind> </div>
?>
</body></html>