Document.CreateDocumentType

Document.CreateDocumentType method

The method returns a DocumentType object which can either be used with DOMImplementation.createDocument upon document creation or can be put into the document via methods like Node.insertBefore() or Node.replaceChild().

public DocumentType CreateDocumentType(string name, string publicId, string systemId, 
    string internalSubset)
ParameterTypeDescription
nameStringIs a DOMString containing the qualified name, like svg:svg.
publicIdStringIs a DOMString containing the PUBLIC identifier.
systemIdStringIs a DOMString containing the SYSTEM identifiers.
internalSubsetStringThe internal subset.

Return Value

The DocumentType.

Examples

var dt = document.CreateDocumentType("svg:svg", "-//W3C//DTD SVG 1.1//EN", "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd", "");

See Also