Contents

insertChild(_:at:)

Inserts a node object at specified position in the receiver’s array of children.

Declaration

func insertChild(_ child: XMLNode, at index: Int)

Parameters

  • child:

    The Xmlnode object to be inserted. The added node must be an NSXMLNode object representing a comment, processing instruction, or the root element.

  • index:

    An integer specifying the index of the children array to insert child. The indexes of children after the new child are incremented. If index is less than zero or greater than the number of children, an out-of-bounds exception is raised.

See Also

Adding and Removing Child Nodes