Click to return to the XML (Extensible Markup Language) home page    
XMLDOMDocument createText...     XMLDOMDocument documentEl...     XMLDOMDocument Object    
Web Workshop  |  XML (Extensible Markup Language)

doctype Property


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

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMDocument

See Also

XMLDOMDocumentType


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.