tags:

views:

26

answers:

1

I need to delete some nodes from an XML variable and I want to keep the original intact.
So I pass the XML to a new variable and delete the nodes from that one but the original changes with it.

Is there a way to protect the XML from the original variable?

+4  A: 

you want to clone the xml, not just set another variable reference to it.

try var xmlbackup:XML = xml.copy();

oedo
Great, that did the jobthx a lot ;)