Action: CreateDocumentType

Purpose: Creates a new Document Type Node and optionally appends it into its owner DOM.

If you don't attach the newly created node, you can attach it to its DOM tree at a later time using either the AppendChild or InsertBefore Action

You need to specify the Qualified Name and optionally the PublicId and/or SystemId of the Document Type Node. For example, if you want to create the following Document Type node:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">

QualifiedName = html
PublicID = -//W3C//DTD XHTML 1.0 Strict//EN
SystemId =

Action-specific name/value pairs:

Parameter Name Description
QualifiedName The Document Type Node's Qualified Name.
PublicId (Optional) The Document Type Node's PublicId. This must be appropriately URL-escaped if necessary
SystemId (optional) The Document Type Node's SystemId. This must be appropriately URL-escaped if necessary
DocumentName or DocumentOID The Name or OID of the DOM in which you wish to create the new Node.
AppendTo (optional) The OID of the Node to which the newly-created Node will be appended as a Last Child. If not specified, the newly created Node will be left unattached in the Document.

Alternatively, the parameters above can be incorporated into a single JSON string and specified using the parameter name JSON, eg:

{QualifiedName:"html",PublicId:"-//W3C//DTD XHTML 1.0 Strict//EN",

Example Request

&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]


&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]

Example Response


<?xml version='1.0'?>
<CreateDocumentTypeResponse xmlns="">

JSON (ie if OutputFormat=JSON specified in the Request)


The OID assigned to the newly-created Comment Node was 1-31. Note that the NodeType (Document Type = 10) is also returned for information only.