W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2000

Re: Creating !DOCTYPE Node

From: Philippe Le Hegaret <plh@w3.org>
Date: Thu, 03 Aug 2000 13:44:29 -0700
Message-ID: <3989D9AD.6353622A@w3.org>
To: Anuja.Z@Vashimail.ltitl.com
CC: www-dom@w3.org
Anuja.Z@Vashimail.ltitl.com wrote:
> I want to create DOCTYPE node using DOM API's. How to create, cause it does not
> have any method to do so, and it is read only property, as everywhere
> mentioned.

interface DOMImplementation {
    boolean            hasFeature(in DOMString feature, 
                                  in DOMString version);
    // Introduced in DOM Level 2:
    DocumentType       createDocumentType(in DOMString qualifiedName, 
                                          in DOMString publicId, 
                                          in DOMString systemId)
    [ ... ]

Since this method was introduced in DOM Level 2, check first
if DOMImplementation.hasFeature("XML", "2.0") returns true.
The DocumentType node is a readonly node.

Received on Thursday, 3 August 2000 22:25:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC