Quantcast

How to clone a Node ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to clone a Node ?

lalith-3

 

Hi there,

 

Can you please let me no how to clone a node?

I tried with the cloneNode(deep) method but with saxon 8.5.1 the method implementation return null.

 

Is there any other way to get a node cloned? Or is it not yet implemented?

 

Please let me know latest on this matter.

 

Thanks.

Lalith

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How to clone a Node ?

Michael Kay
The Saxon DOM implementation is essentially a read-only interface onto Saxon's native tree model, so methods that update nodes or create new nodes are not supported.
 
In the native NodeInfo interface, there is a copy() method, that supports the XSLT/XQuery copy operations. The simplest way to copy a Saxon node is probably to use a JAXP identity transformation (NodeInfo acts as a JAXP Source so it can be used as the first argument of the transform() method.)
 
To give good advice on this, I think I need a better understanding of your application and what you are trying to achieve.
 
Michael Kay


From: [hidden email] [mailto:[hidden email]] On Behalf Of Lalith
Sent: 08 September 2005 12:43
To: [hidden email]
Subject: [saxon] How to clone a Node ?

 

Hi there,

 

Can you please let me no how to clone a node?

I tried with the cloneNode(deep) method but with saxon 8.5.1 the method implementation return null.

 

Is there any other way to get a node cloned? Or is it not yet implemented?

 

Please let me know latest on this matter.

 

Thanks.

Lalith

 

Loading...