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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για