Contains the document type node that specifies the DTD for this document.
objXMLDOMDocumentType = oXMLDOMDocument.doctype
Object. The property is read-only. For XML, it points to the node of type _TYPE that specifies the 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.
The following VBScript example creates an XMLDOMDocumentType object, and then displays the name property of the object:
Dim xmlDoc Dim MyDocType Set xmlDoc = CreateObject("Msxml2.DOMDocument") xmlDoc.async = False xmlDoc.load("c:\books.xml") Set MyDocType = xmlDoc.doctype MsgBox (mydoctype.name)
Applies To: DOMDocument Object