Easy Tutorial
❮ Dom Met Document Createtextnode Index ❯

XML DOM doctype Property



Definition and Usage

The doctype property returns the document type declaration (DTD, short for Document Type Declaration) associated with the document.

For XML documents without a DTD, it returns null.

This property provides direct access to the DocumentType object (a child node of Document).

Syntax


Example

The following code snippet uses loadXMLDoc() to load "note_internal_dtd.xml" into xmlDoc and returns the DocumentType object:

Example

Output:


❮ Dom Met Document Createtextnode Index ❯