XML DOM name attribute
Definition and usage
The name attribute can return the name of the DTD (following the keyword DOCTYPE)
Syntax:
documentObject.doctype.name
Example
In all examples, we will use the XML file note_internal_dtd.xml, and the JavaScript function loadXMLDoc().
The following code snippet can display the name of the DTD associated with the XML document:
xmlDoc=loadXMLDoc("note_internal_dtd.xml");
document.write(xmlDoc.doctype.name
);
Output:
note