Properti systemId DOM XML
Definisi dan Penggunaan
systemId
Atribut mengembalikan system identifier DTD eksternal.
Syntax
documentObject.doctype.systemId
Contoh
Berikut adalah kode yang akan mengambil "note_external_dtd.xml" ke dalam xmlDoc dan menampilkan system id DTD eksternal:
var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { myFunction(this); } }; xhttp.open("GET", "note_external_dtd.xml", true); xhttp.send(); function myFunction(xml) { var xmlDoc = xml.responseXML; document.getElementById("demo").innerHTML = xmlDoc.doctype.systemId; }