Yes this is how the DOM is specified to work.  Normally you save the extra
code by using
  newNode = destinatinationDocument.importNode(Node sourcceNode, true);
  someDestinationNode.appendChild(newNode);
The boolean flag on importNode indicates whether to clone the entire subtree
specified by the sourceNode, or just the root.

There are a few subtleties, so looking at the javadocs for importNode is a
good idea.

Jeff
----- Original Message -----
From: "�yvind Vestavik" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, November 11, 2002 2:27 AM
Subject: Re: Problem with adding DOM node from getContentAsDOM() to other
DOM



It seems that I was only allowed to add to a
DOM document nodes that were created using the same document, ie
doc.createElement(myElement) where doc is the document to wich I want to
add myElement.

Reply via email to