Xmlnode_Object HasChildNodes Property

Returns True if the current node has any non-attribute child nodes.

… xmlnode_object.HasChildNodes

Prerequisites

None

Parameters

None

Remarks

This property returns True if the current node has any children, otherwise it returns False. Attributes are not considered children and are not included in this test.

To determine how many children a node has, use the method xmldoc_object.ChildNodeCount.

Examples

Dim doc As XmlDoc
Dim
root As XmlNode
doc = New XmlDoc("my_doc")
root = doc.DocumentElement
root.AddElement("section1", "Data for section 1")
Console.Writeline(root.HasChildNodes) ' Output is "-1"

See Also

XML Classes | xmlnode_object.ChildNodeCount