OpenXmlElement.ReplaceChild(OpenXmlElement, T) OpenXmlElement.ReplaceChild(OpenXmlElement, T) OpenXmlElement.ReplaceChild(OpenXmlElement, T) Method

Definition

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

public virtual T ReplaceChild<T> (DocumentFormat.OpenXml.OpenXmlElement newChild, T oldChild) where T : DocumentFormat.OpenXml.OpenXmlElement;
abstract member ReplaceChild : DocumentFormat.OpenXml.OpenXmlElement * 'T -> 'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
override this.ReplaceChild : DocumentFormat.OpenXml.OpenXmlElement * 'T -> 'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
Public Overridable Function ReplaceChild(Of T As OpenXmlElement) (newChild As OpenXmlElement, oldChild As T) As T

Type Parameters

T

Parameters

newChild
OpenXmlElement OpenXmlElement OpenXmlElement

The new OpenXmlElement to put in the child list.

oldChild
T T T

The OpenXmlElement being replaced in the list.

Returns

T T T

The OpenXmlElement element that was replaced.

Applies to