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)
                                        raises(DOMException);
    [ ... ]
}

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.

Philippe
Received on Thursday, 3 August 2000 22:25:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT