You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Joakim <jo...@cic.se> on 2000/02/22 20:38:01 UTC

question.

Will xerces provide method for appending other Node implementation
beside NodeImpl?

Now when i try to appendChild of another Node implementation the 
following error is raised "WRONG_DOCUMENT_ERR".
Why not make a conversion to xerces Node type instead of casting that 
exception?

//jocke

Joakim Olausson (joakim@cic.se)
CIC (info@cic.se)
Internet   http://www.cic.se
Telephone. +46 521 26 20 00
Telefax.   +46 521 26 20 20



Re: question.

Posted by Arnaud Le Hors <le...@us.ibm.com>.
Joakim wrote:
> 
> Will xerces provide method for appending other Node implementation
> beside NodeImpl?
> 
> Now when i try to appendChild of another Node implementation the
> following error is raised "WRONG_DOCUMENT_ERR".
> Why not make a conversion to xerces Node type instead of casting that
> exception?

You first need to import the node with the importNode() method on
Document. This is a DOM Level 2 addition, and is supported by Xerces.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

RE: question.

Posted by Linda Derezinski <li...@sclrules.com>.
Try the following:
	newNode = docOne.importNode( docTwo.getFirstChild() )

_______________________________________________________________
Linda Derezinski
Interface & Control Systems

 -----Original Message-----
From: 	Joakim [mailto:joakim@cic.se] 
Sent:	Tuesday, February 22, 2000 2:38 PM
To:	'xerces-dev@xml.apache.org'
Subject:	question.

Will xerces provide method for appending other Node implementation
beside NodeImpl?

Now when i try to appendChild of another Node implementation the 
following error is raised "WRONG_DOCUMENT_ERR".
Why not make a conversion to xerces Node type instead of casting that 
exception?

//jocke

Joakim Olausson (joakim@cic.se)
CIC (info@cic.se)
Internet   http://www.cic.se
Telephone. +46 521 26 20 00
Telefax.   +46 521 26 20 20