You can use this javascript to read XML file located on a website:
function loadXml() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var parser = new DOMParser(); var xmlDoc = parser.parseFromString(this.responseText,"text/xml"); console.log(xmlDoc.getElementsByTagName("time")[0].childNodes[0].nodeValue); } }; xhttp.open("GET", "http://yourhost/ocr.xml", true); xhttp.send();
You can also use PHP to parse a local XML file:
$myXMLData = file_get_contents("ocr.xml", true); $xml=simplexml_load_string($myXMLData); echo $xml->time;
Here is sample XML file created by Scoreboard OCR:
<?xml version="1.0"?> <root> <time>9:31</time> </root>