Lists Home |
Date Index |
- To: email@example.com
- Subject: importNode returns null
- From: Vidar Ramdal <firstname.lastname@example.org>
- Date: Tue, 24 May 2005 17:42:15 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=NTQoq4kQVJAcC/qKyOsPtXLg5c5TWrG9R8CaMNWvui6eXjpXmGtXyHalULLDyaa9co6euqaj0/9SiE0RUWlgPS3DWDerBoAD5Xr7cFLQTYdD3GUvmwG6zLalSDFoOUv6tAkfVxb7aYR/wGxmCXaYINeNmTWk3x7i1udpHLTh78U=
- Reply-to: Vidar Ramdal <email@example.com>
In my Java application, I'm trying replace a node with a node from
another document. I have a reference to the node I wish to replace
(originalNode), and the new node (newNode).
Node importedNode = originalNode.getOwnerDocument().importNode(newNode, true);
However, I couldn't get replaceChild to work, and started
investigating. I found that importedNode is always null - that is,
importNode always returns null.
Does anyone see how this can happen? There are no exceptions thrown.
Vidar S. Ramdal <firstname.lastname@example.org>
"In the beginning, the universe was created. This made a lot of people
very angry, and has been widely regarded as a bad idea." -- Douglas