You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Simon Tyler <ty...@hotmail.com> on 2001/02/02 10:16:19 UTC
Copying a Document
Hi,
I need to copy a Document before modifying the original. I did think
cloneNode would do the job but apparently not - I need the copy to also copy
attributes defaulted in an XML Schema.
importNode looks like the way to go but I can't get it to work. I've tried
creating a new DocumentImpl object using the createDocument method in
DOMIMplementation and then importing the node but it doesn't work! Does
anyone have any code (Java) that can do this?
I'm using Xerces-J 1.2.3.
Many Thanks.
Simon
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.