You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Michael Gratton <mi...@vee.net> on 2000/03/18 05:35:53 UTC

merging DOM documents

Hi guys,

What's the best way to merge nodes from one DOM tree into another?

I can't just do an appendChild() because of the owner document mismatch,
and I've tried doing an setErrorChecking(false) on the target's owner
document, which didn't work either (anyone know why that is, it looks
like it should work fine from the source).

So, is my only option to traverse the tree and create and append new
nodes (identical to the ones I want to merge) from the target's owner
document?

Thanks,
Mike.

-- 
? Michael Gratton - mike@vee.net
! "Scientific progress goes 'boink'?"
> http://web.vee.net/

Re: merging DOM documents

Posted by Michael Gratton <mi...@vee.net>.
Ooo, mailing list archives are wonderful things. Ignore my previous
post, I found the answer.

Mike.

Michael Gratton wrote:
> 
> Hi guys,
> 
> What's the best way to merge nodes from one DOM tree into another?
> 
> I can't just do an appendChild() because of the owner document mismatch,
> and I've tried doing an setErrorChecking(false) on the target's owner
> document, which didn't work either (anyone know why that is, it looks
> like it should work fine from the source).
> 
> So, is my only option to traverse the tree and create and append new
> nodes (identical to the ones I want to merge) from the target's owner
> document?
> 
> Thanks,
> Mike.
> 
> --
> ? Michael Gratton - mike@vee.net
> ! "Scientific progress goes 'boink'?"
> > http://web.vee.net/


-- 
? Michael Gratton - mike@vee.net
! "Scientific progress goes 'boink'?"
> http://web.vee.net/