>DOM_Document doc = impl.CreateDocument ( 0, "company", NULL);
>DOM_DocumentType docType = impl.createDocumentType ("MA", "MA", "ma");
>doc.appendChild (docType);
Not officilly supported in DOM Level 2. Assert the DocumentType in the
createDocument call.
Yes, we know that having to do it in that order is a nuisance for
general-purpose applications which don't know what kind of document they're
building until they've reached the root element. DOM Level 3 is considering
relaxing this restriction. Meanwhile, the usual solution is to buffer the
information and create the Document only after the DocumentType and root
element are known.
(In your example it appears you _do_ know the root element at the time you
call createDocument... which suggests that you probably know, or could
know, the DocumentType at that point.)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]