D McGilvray
Usenet Archive
- Joined
- Aug 25, 2006
- Messages
- 7
- Reaction score
- 0
Hi, I'm stuck on a really simple problem using xerces DOM.
I am parsing an xml file and adding information which is described in an extended DTD. Therefore, I need to change the DTD declaration.
The DOMDocument::createDocumentType(...) method seems to have no effect on the document which already has a dtd declaration. The only way I can see to set the DTD declaration is when you create a new document with
DOMImplementation::createDocument
But when I try to clone the contents of the original document and append them to the new doument xerces throws a WRONG_DOCUMENT_ERROR in my face.
Is there some dark magic I need to perform? Or am I having a blonde day and I can't see the woods for my fringe?
Thanks for your time,
Dougie
I am parsing an xml file and adding information which is described in an extended DTD. Therefore, I need to change the DTD declaration.
The DOMDocument::createDocumentType(...) method seems to have no effect on the document which already has a dtd declaration. The only way I can see to set the DTD declaration is when you create a new document with
DOMImplementation::createDocument
But when I try to clone the contents of the original document and append them to the new doument xerces throws a WRONG_DOCUMENT_ERROR in my face.
Is there some dark magic I need to perform? Or am I having a blonde day and I can't see the woods for my fringe?
Thanks for your time,
Dougie