Propriedade XML DOM systemId
❮ Objeto DocumentType
Exemplo
O fragmento de código a seguir carrega " note_external_dtd.xml " no xmlDoc e exibe o ID do sistema para o DTD externo:
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;
}
A saída do código acima será:
note.dtd
Definição e uso
A propriedade systemId retorna o identificador do sistema do DTD externo.
Sintaxe
documentObject.doctype.systemId
❮ Objeto DocumentType