You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Jason Harrop <jh...@bigpond.net.au> on 2000/03/10 09:15:13 UTC

use of replaceChild?

Hello;  i was hoping someone could help me out with an example of how to
use replaceChild.

Suppose my node had 5 children, and i wanted to replace the third child.

I have tried making a NodeList with getChildNodes, and then using
replaceChild, where oldChild is the third item in the node list.  But
this seems to give DOM Exception 005 Wrong document.

What is the easiest way to do this please?

thanks

jason harrop