I've had this problem in the past, and I found that the simplest workaround
is to generate a stub document along the lines of:
<!DOCTYPE xxx SYSTEM xxxxxx>
If memory serves me, msxml has a method to load a document from a BSTR (if
you are using C++) or a string (if you are using Visual Basic), so you can
load the stub document, and then build and modify its contents using all the
usual DOM methods.
From: Almiro Pérez Verdú [mailto:[log in to unmask]]
Sent: 17 October 2001 14:43
To: [log in to unmask]
Subject: DOMDocument doubt
I'm trying to generate an XML file using DOM (msxml.dll). I'm trying to
create the <!DOCTYPE xxx SYSTEM xxxxxx> element but I'm not able. I don't
find in DOMDocument a "CreateDoctype function" and when I try to use
CreateNode and set the type element to NODE_DOCUMENT_TYPE it doesn't accept
I've been trying to Set the doctype property of the DomDocument to a
variable, but it doesn't accept it either.
I wouldn't like to write my header file as plain text and then open it and
keep going, but if there's no other chance I would. Any other suggestion?
Thanks a lot