Skip to content

Clone

Creates a detached deep copy of the current node.

1
myXml.Clone():Xml

Returns

A new Xml node that is not attached to the current document.

Remarks

Available only in server scripts. Changes to the copy do not affect the original node, which makes it useful for preparing data to send to a service or to save to the XML repository.

Examples

Prepare a modified copy without changing the pool data

1
2
3
4
var customer = $Xml.SelectSingle('Customer').Clone();
customer.SetValue('Email', '');

var xml = customer.OuterXml();                            // the original Customer/Email is unchanged

See Also