Propiedad XML DOM systemId
❮ Objeto de tipo de documento
Ejemplo
El siguiente fragmento de código carga " note_external_dtd.xml " en xmlDoc y muestra la identificación del sistema para la DTD externa:
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;
}
La salida del código anterior será:
note.dtd
Definición y uso
La propiedad systemId devuelve el identificador del sistema de la DTD externa.
Sintaxis
documentObject.doctype.systemId
❮ Objeto de tipo de documento