If creating XML document with DOM API, sometimes it is required to add
DOM_DocumentType node to the
DOM_Document.


For eample, to create simple XML document
<!DOCTYPE A [<!ELEMENT A ANY>]>
<A/>

I would write:

DOM_DOMImplementation& di = DOM_DOMImplementation::getImplementation();
DOM_DocumentType dtNode =di.createDocumentType("A", 0, 0, "<!ELEMENT A
ANY>");
DOM_Document doc = impl.createDocument(0 ,"A", dtNode );


But the only way (through the public headers) to create the DOM_DocumentType
node is to call

dom/DOM_DOMImplementation.hpp
---------------------------------------------
DOM_DocumentType createDocumentType(
    const DOMString &qualifiedName,
    const DOMString &publicId,
    const DOMString &systemId
);

But since you've made only DOMParser be able to access internalSubset, I
cannot see any other way to set internalSubset manually as to modify your
library.

Was it a reason not to provide createDocumentType(name, publicId, systemId,
internalSubset) method?



Peter A. Volchek
Software Engineer
Metis International, Inc.
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to