Balchandra Kemkar wrote:
Hi,
Whenever I use adoptNode function, it throws an exception
"NOT_SUPPORTED".
In net at many places I found that adoptNode is not implemented fully.
Is there any other way to change the owner document of the DOM node?
I cant use importNode as it creates a copy of the DOM node.
In my code I want to change the owner document of a DOM node without
copying it.

Because of the way the Xerces-C DOM implements memory management, it's not possible to implement DOMNode::adoptNode() completely. In particular, as you've discovered, you cannot use adoptNode() to change ownership of a node from one document to another.

Dave

Reply via email to