What is an easy way to move a node and all its children and attributes and attach it to a different part of the XML document?
If I could orphan a node here and graft it there, that would do the trick.
Not as efficiently as you state..I think the following should work:
newNode = existing.Clone(); existingParent.RemoveChild( existing )
which will give you a copy and get rid of the old one.
Does that work? lee
Yes, I think that works. Thank you.
Log in to post a comment.
What is an easy way to move a node and all its children and attributes and attach it to a different part of the XML document?
If I could orphan a node here and graft it there, that would do the trick.
Not as efficiently as you state..I think the following should work:
newNode = existing.Clone();
existingParent.RemoveChild( existing )
which will give you a copy and get rid of the old one.
Does that work?
lee
Yes, I think that works. Thank you.