Export (0) Print
Expand All

XPathNavigator.HasChildren Property

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

Namespace: System.Xml.XPath
Assembly: System.Xml (in system.xml.dll)

public virtual bool HasChildren { get; }
/** @property */
public boolean get_HasChildren ()

public function get HasChildren () : boolean

Property Value

Returns true if the current node has any child nodes; otherwise, false.

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.

NoteNote

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.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft