Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Contains the document type node that specifies the document type definition (DTD) for this document.

Script Syntax

Copy Code
var objXMLDOMDocumentType = oXMLDOMDocument.doctype;

Remarks

Script Parameters

None.

Script Return Value

For XML, the address of the node of type NODE_DOCUMENT_TYPE that specifies the DTD. Returns Null for XML documents without a DTD and for HTML documents.

C/C++ Syntax

Copy Code
HRESULT get_doctype(
  IXMLDOMDocumentType** 
documentType
);

Remarks

C/C++ Parameters

documentType

[out, retval] For XML, the address of the node of type NODE_DOCUMENT_TYPE that specifies the DTD. Returns Null for XML documents without a DTD and for HTML documents.

C/C++ Return Values

S_OK

Value returned if successful.

S_FALSE

Value returned when there is no doctype node.

E_INVALIDARG

Value returned if documentTypeis Null.

Requirements

Header msxml2.h, msxml2.idl
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

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.

This property is read-only, and applies to the following objects and interfaces:

DOMDocumentand IXMLDOMDocumentType.