Instance Property

parent

Returns the parent node of the receiver.

Declaration

@property(readonly, copy) NSXMLNode *parent;

Discussion

Document nodes and standalone nodes (that is, the root of a detached branch of a tree) have no parent, and sending this message to them returns nil. A one-to-one relationship does not always exists between a parent and its children; although a namespace or attribute node cannot be a child, it still has a parent element.

See Also

Navigating the Tree of Nodes

rootDocument

Returns the NSXMLDocument object containing the root element and representing the XML document as a whole.

- childAtIndex:

Returns the child node of the receiver at the specified location.

childCount

Returns the number of child nodes the receiver has.

children

Returns an immutable array containing the child nodes of the receiver (as NSXMLNode objects).

nextNode

Returns the next NSXMLNode object in document order.

nextSibling

Returns the next NSXMLNode object that is a sibling node to the receiver.

previousNode

Returns the previous NSXMLNode object in document order.

previousSibling

Returns the previous NSXMLNode object that is a sibling node to the receiver.

- detach

Detaches the receiver from its parent node.