Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Xerces: Changing dtd declaration

Reply
Thread Tools

Xerces: Changing dtd declaration

 
 
D McGilvray
Guest
Posts: n/a
 
      08-25-2006


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
 
Reply With Quote
 
 
 
 
D McGilvray
Guest
Posts: n/a
 
      08-25-2006


Just found it
DOMDocument::importNode imports from another document.

SOmetimes you just need to explain your problems to someone else and
they all become clear .

Cheers anyway.
DOug
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML file from one DTD to another DTD test Java 2 07-28-2006 08:48 PM
How to specify DTD to DTD.getDTD for DocumentParser? Ronald Fischer Java 4 03-17-2005 09:37 AM
Removing the dtd name when using print(...) on the dtd generated class Joseph Tilian Java 0 12-21-2004 02:58 PM
Including a dtd into another dtd... possible? Asfand Yar Qazi XML 1 09-19-2003 12:10 PM
Effect of DTD declaration on XSL processing? Simon Brooke XML 5 07-25-2003 10:35 AM



Advertisments