XPathNavigator.HasChildren Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether the current node has any child nodes.
public:
virtual property bool HasChildren { bool get(); };
public:
abstract property bool HasChildren { bool get(); };
public virtual bool HasChildren { get; }
public abstract bool HasChildren { get; }
member this.HasChildren : bool
Public Overridable ReadOnly Property HasChildren As Boolean
Public MustOverride ReadOnly Property HasChildren As Boolean
Property Value
true
if the current node has any child nodes; otherwise, false
.
Remarks
If the XPathNavigator is positioned on a node that cannot have child nodes, the HasChildren property always returns false
.
The following table lists the child node XPathNodeType nodes allowed for each XPathNodeType node.
XPathNodeType Node | Child XPathNodeType Nodes |
---|---|
Root | Element, Comment, or ProcessingInstruction nodes. Note: DocumentFragment is equivalent to Root when using the XmlDocument class and can have the same children as an element. |
Element | Element, Text, Comment, ProcessingInstruction, Whitespace or SignificantWhitespace nodes. |
All other XPathNodeType nodes | Cannot have child nodes. |
Applies to
See also
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.