[Home] [By Thread] [By Date] [Recent Entries]

  • From: Mike.Champion@S...
  • To: xml-dev@l...
  • Date: Wed, 11 Oct 2000 08:57:45 -0400

Title: RE: DOM (level 1): moving elements from one document to another


    -----Original Message-----
    From:   Julian Reschke [SMTP:julian.reschke@g...]
    Sent:   Wednesday, October 11, 2000 6:57 AM
    To:     XML-Dev
    Subject:        DOM (level 1): moving elements from one document to another


    >appendChild() doesn't let me add a child if it's ownerDocument is different
    >from the one where it should be added. What is the easiest way to get around
    >this (besides manually creating new nodes in the new Document)?

    DOM Level 2 has an importNode method that lets you copy a node (or subtree under a node)
    from one document to another. In Level 1, I believe you have to do this "by hand".  Specific
    Level 1 implementations may have proprietary extensions to let you get around this more easily.



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member