Instance Method

insertChild:atIndex:

Inserts a child node in the receiver’s list of children at a specific location in the list.

Declaration

- (void)insertChild:(NSXMLNode *)child atIndex:(NSUInteger)index;

Parameters

child

An XML-node object that represents the child to insert.

index

An integer identifying the location in the receiver's list of children to insert child. The indices of subsequent children in the list are incremented by one.

See Also

Manipulating Child Nodes

- addChild:

Adds a child node to the end of the list of existing children.

- insertChildren:atIndex:

Inserts an array of child nodes at a specified location in the receiver’s list of children.

- removeChildAtIndex:

Removes the child node at a particular location in the receiver’s list of children.

- replaceChildAtIndex:withNode:

Replaces a child at a particular index with another child.

- setChildren:

Removes all existing children of the receiver and replaces them with an array of new child nodes.