Latest web development tutorials

XML DOM name attribute

DocumentType Object Reference DocumentType objects

Definition and Usage

name property returns the name of the DTD (immediately following the DOCTYPE keyword name).

grammar

documentObject.doctype.name


Examples

The following code fragment uses loadXMLDoc () to " the Books.xml " into xmlDoc, and displays the name of the DTD:

Examples

xmlDoc=loadXMLDoc("note_internal_dtd.xml");
document.write(xmlDoc.doctype.name);

Output:

note

try it"

DocumentType Object Reference DocumentType objects