OpenXmlElement.Clone method

Office 2013 and later

Creates a duplicate of the current node.

Namespace:  DocumentFormat.OpenXml
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public Object Clone()

Return value

Type: System.Object
The cloned node.

Implements

ICloneable.Clone()

Cloning an OpenXmlNode copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes. This method recursively clones the node and the subtree underneath it. Clone is equivalent to calling CloneNode(true).

Show: