Sign in Join
FPDoc Onlineexperiment

TDOMNode_WithChildren.GetChildCount function

Member of TDOMNode_WithChildrenpublicIn unit Laz2_DOM

Gets the number of child nodes for the DOM node instance.

Declaration

pascal
function GetChildCount: SizeInt; override

Function result

Number of child nodes in the DOM node.

Description

GetChildCount is an overridden SizeInt function in TDOMNode_WithChildren. It is used to get the number of child nodes for the class instance. No actions are performed in the method if FirstChild has not been assigned, and the return value is set to 0.

If a DOMNodeList has been assigned to ChildNodes, its Count property is used as the return value. If ChildNodes has not been assigned, the child nodes are visited (starting at FirstChild and proceeding to its NextSibling) to count the number of child nodes.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.