Click or drag to resize

OpenXmlCompositeElementReplaceChildT Method

Replaces one of the current element's child elements with another OpenXmlElement element.

Namespace: DocumentFormat.OpenXml
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll) Version: 2.11.3+Branch.master.Sha.3fcdea311b5a001803ff150de35c25fd4cd62f93.3fcdea311b5a001803ff150de35c25fd4cd62f93
Syntax
public override T ReplaceChild<T>(
	OpenXmlElement newChild,
	T oldChild
)
where T : OpenXmlElement

Parameters

newChild  OpenXmlElement
The new OpenXmlElement to put in the child list.
oldChild  T
The OpenXmlElement to be replaced in the child list. Must be a child of the current element.

Type Parameters

T

Return Value

T
The OpenXmlElement that was replaced.
Remarks
Returns null if newChild equals null.
See Also