ReplaceChild()

XmlAttribute::ReplaceChild(SharedPtr<XmlNode>, SharedPtr<XmlNode>) method

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

SharedPtr<XmlNode> System::Xml::XmlAttribute::ReplaceChild(SharedPtr<XmlNode> newChild, SharedPtr<XmlNode> oldChild) override

Arguments

ParameterTypeDescription
newChildSharedPtr<XmlNode>The new child XmlNode.
oldChildSharedPtr<XmlNode>The XmlNode to replace.

Return Value

The XmlNode replaced.

Exceptions

ExceptionDescription
InvalidOperationExceptionThis node is of a type that does not allow child nodes of the type of the newChild node. The newChild is an ancestor of this node.
ArgumentExceptionThe newChild was created from a different document than the one that created this node. This node is read-only. The oldChild is not a child of this node.

See Also