XmlElement.ParentNode XmlElement.ParentNode XmlElement.ParentNode XmlElement.ParentNode Property

定義

取得這個節點的父代 (對於具有父代的節點而言)。Gets the parent of this node (for nodes that can have parents).

public:
 virtual property System::Xml::XmlNode ^ ParentNode { System::Xml::XmlNode ^ get(); };
public override System.Xml.XmlNode ParentNode { get; }
member this.ParentNode : System.Xml.XmlNode
Public Overrides ReadOnly Property ParentNode As XmlNode

屬性值

表示目前節點父代的 XmlNodeThe XmlNode that is the parent of the current node. 如果剛剛建立節點而尚未加入樹狀中,或者已經從樹狀中移除,則父代為 nullIf a node has just been created and not yet added to the tree, or if it has been removed from the tree, the parent is null. 對於其他所有節點,傳回的值視節點的 NodeType 而定。For all other nodes, the value returned depends on the NodeType of the node. 下表描述 ParentNode 屬性的可能傳回值。The following table describes the possible return values for the ParentNode property.

適用於