minimal xml request

JavaScript

var url = "http://json.sandboxed.guru/chapter9/cors.php";

var xmlHttp = new XMLHttpRequest();

if (xmlHttp) {
    xmlHttp.open('GET', url, true);
    xmlHttp.onreadystatechange = function () {
        if (xmlHttp.readyState == 4) {
            document.write(xmlHttp.responseText);
        }
    };
    xmlHttp.send();
}