Proprietà XML DOM systemId
❮ Oggetto TipoDocumento
Esempio
Il seguente frammento di codice carica " note_external_dtd.xml " in xmlDoc e visualizza l'id di sistema per il DTD esterno:
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;
}
L'output del codice sopra sarà:
note.dtd
Definizione e utilizzo
La proprietà systemId restituisce l'identificatore di sistema del DTD esterno.
Sintassi
documentObject.doctype.systemId
❮ Oggetto TipoDocumento