Contents

replaceChild(at:with:)

Replaces a child node at a specified location with another child node.

Declaration

func replaceChild(at index: Int, with node: XMLNode)

Parameters

  • index:

    An integer identifying a position in the receiver’s list of children. An exception is raised if index is out of bounds.

  • node:

    An XML node object that will replace the current child.

Discussion

The replaced XML node object is released upon removal.

See Also

Manipulating Child Elements