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
NSXMLNodeobject 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. Ifindexis less than zero or greater than the number of children, an out-of-bounds exception is raised.