Peet Sneekes wrote: > > Hi, > > I want to replace an Element of a Document with another Element from another > Document. > So I first clone the new Element and than I do replaceChild() (see sample > code). > > Still it gives the "DOM005 Wrong document" error.
The new child is from a different document, even after cloning. You need to do an importNode (or something) before attempting to add the new element to the document. Hope this helps, Mike.