Partager via


doctype Property

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Script Syntax

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

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 documentType is 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:

DOMDocument and IXMLDOMDocumentType.