XML DOM systemId Eiendom
❮ Dokumenttipe voorwerp
Voorbeeld
Die volgende kodefragment laai " note_external_dtd.xml " in xmlDoc en vertoon die stelsel-ID vir die eksterne DTD:
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;
}
Die afvoer van die kode hierbo sal wees:
note.dtd
Definisie en gebruik
Die systemId-eienskap gee die stelselidentifiseerder van die eksterne DTD terug.
Sintaksis
documentObject.doctype.systemId
❮ Dokumenttipe voorwerp