Instance Property インスタンスプロパティ

parent

Returns the parent node of the receiver. レシーバの親ノードを返します。

Declaration 宣言

@property(nullable, 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. 書類ノードと独立型ノード(すなわち、ツリーの分離した枝のルート)は、親を持ちません、そしてこのメッセージをそれらに送ることは、nilを返します。一対一関係は、常に親とそれの子らの間に存在しません;名前空間または属性ノードは子であることができないにもかかわらず、それは依然として親要素を持ちます。

See Also 参照

Navigating the Tree of Nodes ノードのツリーを閲覧する