xml.DomDocument.createDocumentType

Creates an XML Document Type (DTD) DomNode object for a DomDocument object.

Syntax

createDocumentType(
   name STRING,
   publicID STRING,
   systemID STRING,
   internalDTD STRING )  
  RETURNING object xml.DomNode
  1. name is the name of the document type.
  2. publicID is the URI of the public identifier.
  3. systemID is the URL of the system identifier (Specifies the file location of the external DTD subset).
  4. internalDTD is the internal DTD subset.

Usage

Creates an XML Document Type (DTD) DomNode object for this DomDocument object; name is the name of the document type; publicID is the URI of the public identifier or NULL; systemID is the URL of the system identifier or NULL (Specifies the file location of the external DTD subset); internalDTD is the internal DTD subset or NULL.

Returns a DomNode object, or NULL if internalDTD is malformed.

CAUTION:
Not part of W3C API.

Only internal DTDs are supported.

The public identifier cannot be set without the system identifier.

In case of error, the method throws an exception and sets the STATUS variable with the appropriate error number.