XmlDocumentFragment.ReplaceChild(IXmlNode, IXmlNode) XmlDocumentFragment.ReplaceChild(IXmlNode, IXmlNode) XmlDocumentFragment.ReplaceChild(IXmlNode, IXmlNode) XmlDocumentFragment.ReplaceChild(IXmlNode, IXmlNode) XmlDocumentFragment.ReplaceChild(IXmlNode, IXmlNode) Method

Definition

Replaces the specified old child node with the supplied new child node.

public : IXmlNode ReplaceChild(IXmlNode newChild, IXmlNode referenceChild)
IXmlNode ReplaceChild(IXmlNode newChild, IXmlNode referenceChild) const;
public IXmlNode ReplaceChild(IXmlNode newChild, IXmlNode referenceChild)
Public Function ReplaceChild(newChild As IXmlNode, referenceChild As IXmlNode) As IXmlNode
var iXmlNode = xmlDocumentFragment.replaceChild(newChild, referenceChild);

Parameters

newChild
IXmlNode IXmlNode IXmlNode

The new child that is to replace the old child. If null, the referenceChild parameter is removed without a replacement.

referenceChild
IXmlNode IXmlNode IXmlNode

The old child that is to be replaced by the new child.

Returns

The old child that is replaced. If null, no object is created.