This documentation is archived and is not being maintained.

XPathNavigator.HasChildren Property

Gets a value indicating whether the current node has child nodes.

[Visual Basic]
Public MustOverride ReadOnly Property HasChildren As Boolean
public abstract bool HasChildren {get;}
public: __property virtual bool get_HasChildren() = 0;
public abstract function get HasChildren() : Boolean;

Property Value

true if the current node has child nodes; otherwise, false. If the navigator is positioned on a node which cannot have children, this property always returns false.


The following table lists the XPathNodeType and what type of child nodes they may have, if any.

XPathNodeType Child Nodes
Root Element, comment or processing instruction nodes.
Element Element, text, comment, whites pace or significant white space nodes.
All other XpathNodeType nodes These node types cannot have child nodes.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

XPathNavigator Class | XPathNavigator Members | System.Xml.XPath Namespace | MoveToFirstChild | MoveToParent | MoveToNext