XML DOM doctypeProperty
Document object
Definition and Usage
The doctype attribute returns the document type declaration (DTD) associated with the document.
For XML documents without a DTD, returns null.
This attribute provides access toDocumentType ObjectDirect access to (a child node of Document).
Syntax
documentObject.doctype
Example
The following code snippet usesloadXMLDoc()put "note_internal_dtd.xmlLoad into xmlDoc and return the DocumentType object:
Example
xmlDoc=loadXMLDoc("note_internal_dtd.xml");
document.write(xmlDoc.doctype);
document.write(xmlDoc.doctype);
Output:
[object DocumentType]
Try it Yourself »
Document objectother extensions