Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<div id='showCD'></div>
<script>
const xhttp = new XMLHttpRequest();
xhttp.onload = function() {
  const xmlDoc = xhttp.responseXML; 
  const cd = xmlDoc.getElementsByTagName("CD");
  myFunction(cd, 0);
}
xhttp.open("GET.html", "cd_catalog.xml");
xhttp.send();
function myFunction(cd, i) {
  document.getElementById("showCD").innerHTML =
  "Artist: " +
  cd[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue +
  "<br>Title: " +
  cd[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue +
  "<br>Year: " + 
  cd[i].getElementsByTagName("YEAR")[0].childNodes[0].nodeValue;
}
</script>
</body>
<!-- Mirrored from www.mdssup.ma/js/tryit.asp?filename=tryjs_ajax_app_first by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 14:47:00 GMT -->
</html>