Using F12 in firefox, showed "NS_ERROR_FAILURE:" for html:16 (xml.send();)
According to the opensource website https://data.gov.hk/en-data/dataset/clp-team1-electric-vehicle-charging-location/resource/c9dc4e0f-c618-445b-9c00-7f3d952b1e8a, it said HTTPS request method: GET can be used. Why error shown? Thanks !
<html>
<head>
<title>Reading XML file</title>
</head>
<body>
<h1>XML file</h1>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
alert("I am an alert box!");
var xml = new XMLHttpRequest();
xml.open('GET','https://opendata.clp.com.hk/GetChargingSectionXML.aspx?lang=en',false);
xml.send();
var xmlData = xml.responseText;
document.write(xmlData);
}