Instance Method

replaceChildAtIndex:withNode:

Replaces a child at a particular index with another child.

Declaration

- (void)replaceChildAtIndex:(NSUInteger)index withNode:(NSXMLNode *)node;

Parameters

index

An integer identifying the position of a node in the receiver's list of child nodes.

node

An NSXMLNode object to replace the object at index.

Discussion

The replaced child node is released.

See Also

Manipulating Child Nodes

- addChild:

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

- insertChild:atIndex:

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

- 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.

- setChildren:

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