You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Doron, Asaf" <As...@icomverse.com> on 2001/01/14 11:19:58 UTC

Bug report in Xerces-J version 1.2.3

Hello,

Please try to help me with the following problem, it might be a bug or miss
use of your code.

Essential Data :
*	Version number of Xerces-J : 1.2.3 
*	Version number of JDK  :1.2.2  
*	Sample XML file that causes the bug : attached file.

Problem Description : 

I try to create new empty org.apache.xerces.dom.DocumentImpl and insert sub
node from other document,
using the adoptNode method.
When I try to print the original document (The one I import the node from)
it seems that the imported node is 
no longer exists (and it's good) but when I try to print the new document
then it seems that it's still empty.
Please try to look at the attached file and whether you can help me.


Regards 

Asaf Doron.
	
 <<XmlTest.java>> 
------------------------------------------------------------
Asaf Doron
Exalink Mobile Internet Division
Comverse Network Systems
Office: 03-7663353 
Mobile: 054-753832
Fax: 15154753832 
<ma...@icomverse.com> 



RE: Bug report in Xerces-J version 1.2.3

Posted by Jay Cain <ja...@cett.msstate.edu>.
Asaf,

The adoptNode method changes owner document of a node from another
DOMImplementation of the same type (i.e. between two Xerces DOM documents).
When a node is adopted, the parent is set to null, so it has no parent. You
must set the parent using the appendChild or insertChild methods.

It seems the documentation for adoptNode is deficient. Also, have the method
return the node passed in would be a nice convenience. That way it could be
called as the parameter of something such as appendChild.

- - - - -
Jay Cain
Center for Educational and Training Technology
Mississippi State University

> -----Original Message-----
> From: Doron, Asaf [mailto:Asaf_Doron@icomverse.com]
> Sent: Sunday, January 14, 2001 4:20 AM
> To: 'xerces-j-dev@xml.apache.org'
> Subject: Bug report in Xerces-J version 1.2.3
>
>
> Hello,
>
> Please try to help me with the following problem, it might be a
> bug or miss
> use of your code.
>
> Essential Data :
> *     Version number of Xerces-J : 1.2.3
> *     Version number of JDK  :1.2.2
> *     Sample XML file that causes the bug : attached file.
>
> Problem Description :
>
> I try to create new empty org.apache.xerces.dom.DocumentImpl and
> insert sub
> node from other document,
> using the adoptNode method.
> When I try to print the original document (The one I import the node from)
> it seems that the imported node is
> no longer exists (and it's good) but when I try to print the new document
> then it seems that it's still empty.
> Please try to look at the attached file and whether you can help me.
>
>
> Regards
>
> Asaf Doron.
>
>  <<XmlTest.java>>
> ------------------------------------------------------------
> Asaf Doron
> Exalink Mobile Internet Division
> Comverse Network Systems
> Office: 03-7663353
> Mobile: 054-753832
> Fax: 15154753832
> <ma...@icomverse.com>