Returns the number of children of the current node.
…xmlnode_object.ChildNodeCount
Prerequisites
None
Parameters
None
Remarks
This property counts the number of children of a node. Attributes are not considered children and are not included in this count.
The method xmlnode_object.HasChildNodes is more efficient if you only want to know if a node has children but do not care how many it has.
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.ChildNodeCount) ' Output is "1"
See Also