Share via


doctype Property (Compact 2013)

3/26/2014

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

Syntax

var objXMLDOMDocumentType = oXMLDOMDocument.doctype;
HRESULT get_doctype(
  IXMLDOMDocumentType** documentType
);

Parameters

Script

None.

C/C++

  • 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.

Return Value

Script

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++

  • S_OK
    Value returned if successful.
  • S_FALSE
    Value returned when there is no doctype node.
  • E_INVALIDARG
    Value returned if documentType is Null.

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.

Requirements

Header

msxml2.h,
msxml2.idl

See Also

Reference

XML DOM Properties