merging two doms

Discussion in 'Java' started by vissuyk@yahoo.com, Jul 13, 2005.

  1. Guest

    Hi,

    What API exists to merge two in-memory dom trees? I saw importNode but
    not sure if it handles the merge in all cases (e.g new child elements,
    deleted child elements re-parenting etc).

    Is importNode the right API ?. Is there any other api or code that
    anyone can share ?.

    Thanks a lot

    Vissu
    , Jul 13, 2005
    #1
    1. Advertising

  2. Alan Krueger Guest

    wrote:
    > What API exists to merge two in-memory dom trees? I saw importNode but
    > not sure if it handles the merge in all cases (e.g new child elements,
    > deleted child elements re-parenting etc).
    >
    > Is importNode the right API ?. Is there any other api or code that
    > anyone can share ?.


    I believe DOM nodes can only be placed into the tree that owns them. If
    I remember correctly, you'll need to use importNode to deep-copy a DOM
    sub-tree into another tree if you want to merge.
    Alan Krueger, Jul 13, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JNU
    Replies:
    3
    Views:
    348
    Roedy Green
    Sep 3, 2003
  2. Mark
    Replies:
    3
    Views:
    675
    Oliver Wong
    Mar 31, 2006
  3. Daniel
    Replies:
    4
    Views:
    142
    Daniel
    Jul 9, 2003
  4. Jeff Gutsell

    writing for both DOMs

    Jeff Gutsell, Nov 9, 2004, in forum: Javascript
    Replies:
    5
    Views:
    80
    Randy Webb
    Nov 10, 2004
  5. theGirl

    Problem with 2 similar doms

    theGirl, Feb 16, 2006, in forum: Javascript
    Replies:
    2
    Views:
    88
    theGirl
    Feb 17, 2006
Loading...

Share This Page