[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

importNode returns null

  • To: xml-dev@l...
  • Subject: importNode returns null
  • From: Vidar Ramdal <vramdal@g...>
  • 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 <vramdal@g...>

importnode
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);
originalNode.getParentNode().replaceChild(importedNode, originalNode);

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 <vramdal@g...>
"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
Adams

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.