Click or drag to resize

OpenXmlElementReplaceChildT Method

Replaces a child element with another child element in the current element's list of child elements.

Namespace: DocumentFormat.OpenXml
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll) Version: 2.20.0+Branch.release-v2.20.0.Sha.a873d3fbff9bffe179fea62486da950adf5be65d.a873d3fbff9bffe179fea62486da950adf5be65d
Syntax
public virtual T ReplaceChild<T>(
	OpenXmlElement newChild,
	T oldChild
)
where T : OpenXmlElement

Parameters

newChild  OpenXmlElement
The new child element to put in the list.
oldChild  T
The child element to replace in the list.

Type Parameters

T

Return Value

T
The OpenXmlElement element that was replaced.
See Also