You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by George Papamarkos <g....@dcs.bbk.ac.uk> on 2003/06/10 19:58:46 UTC

Setting Owner Document

Hi all,
        I am trying to find a way to set the owner document of a node to the
one I want. Is there any proprietary way to do so?
I would appriciate any help.

Regards,

George


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Setting Owner Document

Posted by Elena Litani <el...@ca.ibm.com>.
Hi George,

George Papamarkos wrote:
>         I am trying to find a way to set the owner document of a node to the
> one I want. Is there any proprietary way to do so?
> I would appriciate any help.

You should use adoptNode [1] either by casting to
org.apache.xerces.dom.DocumentImpl or by using Xerces2 DOM level 3
support (still experimental) [2].


[1] http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-adoptNode
[2] http://xml.apache.org/xerces2-j/faq-dom.html#faq-3

Thank you,
-- 
Elena Litani / IBM Toronto

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Setting Owner Document

Posted by Joseph Kesselman <ke...@us.ibm.com>.



I don't know whether Xerces has prototyped this, but DOM Level 3 introduces
the adoptNode() method. Support for it will be optional even after DOM3 is
a recommendation, but if it can be done at all that's the semi-portable way
to do it.

If not, see the DOM FAQ re importNode() and other ownerDocument issues.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org