This is a known bug in xerces 1.0.1 and has been fixed.
You can get the fix from CVS (copy and paste the code of
the 2nd constructor in DocumentImpl.cpp) or wait for the
upcoming new release.
Chih-Hsiang Chou
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]
----- Original Message -----
From: "Born Franz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 06, 2000 8:32 AM
Subject: CreateDOMDocument
Maybe I was a little too early in getting CreateDOMDocument and trying to
run it with xerces1.0.1 under VC++5.0.
Especially as I faced the problem, that
DOM_Element rootElem = doc.getDocumentElement();
returned a "0-pointer".
I applied the following changes (#else) and now it works.
DOM_DOMImplementation impl;
DOM_Document doc = impl.createDocument(
0, // root element namespace URI.
"company", // root element name
DOM_DocumentType()); // document type object (DTD).
#if 0
DOM_Element rootElem = doc.getDocumentElement();
#else
DOM_Element rootElem = doc.createElement("company");
doc.appendChild(rootElem);
#endif
----------
Now I'd like to know, how to parse a given DTD separately, so I can use it
for validation of the new created document.
Best regards,
Franz