OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread Index ]
  • From: Mike.Champion@SoftwareAG-USA.com
  • To: xml-dev@lists.xml.org
  • 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@gmx.de]
    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.



  • Follow-Ups:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS