NodeClone Method

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.12
Syntax
public Node Clone(
	bool isCloneChildren
)

Parameters

isCloneChildren
Type: SystemBoolean

Return Value

Type: Node
Examples
Shows how to clone composite nodes with and without their child nodes.
// Create a new empty document.
Document doc = new Document();

// Add some text to the first paragraph
Paragraph para = doc.FirstSection.Body.FirstParagraph;
para.AppendChild(new Run(doc, "Some text"));

// Clone the paragraph and the child nodes.
Node cloneWithChildren = para.Clone(true);
// Only clone the paragraph and no child nodes.
Node cloneWithoutChildren = para.Clone(false);
See Also