Contains the document type node that specifies the DTD for this document.
Syntax
objXMLDOMDocumentType = oXMLDOMDocument.doctype
Remarks
Object. The property is read-only. For XML, it points to the node of type NODE_DOCUMENT_TYPE that specifies the document type definition (DTD). It returns NULL for XML documents without a DTD, and for HTML documents.
An XML document can contain a document type declaration before the first element in the document. It starts with the tag <!DOCTYPE > and can specify an external DTD.
Example
The following VBScript example creates an XMLDOMDocumentType object, then displays the name property of the object:
Dim xmlDoc
Dim MyDocType
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
Set MyDocType = xmlDoc.doctype
MsgBox (mydoctype.name)
Applies To
See Also