You need to use DOM_Document::createXMLDecl() to create a non-null XMLDecl:
DOM_XMLDecl domDecl = m_Doc.createXMLDecl ("1.0", // XML version
"UTF-8", // encoding
""); // standalone flag
Note that this is a Xerces extension to the DOM, experimental and subject to
change.
Also, I think you'll want to use getDocumentElement() as I recommended, not
getFirstChild().
-----Original Message-----
From: Chaim Koshizky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 5:35 AM
To: '[EMAIL PROTECTED]'
Subject: RE: DOMPrint: Declaration and Document Type
I tried creating DOM_XMLDecl and insert before.
It does not work the way you describe.
here is the code :
DOM_XMLDecl domDecl; // It
creates a null Dec
DOM_Node child = m_Doc.getFirstChild();
m_RootElement.insertBefore(&domDecl,child);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]