om.DomNode.getFirstChild

Returns the first child DOM node.

Syntax

getFirstChild()
  RETURNS om.DomNode

Usage

The getFirstChild() method returns the first child DOM node in the current node.

This method is typically used to scan child nodes with the getNext() method, until getNext() returns NULL.

Example

FUNCTION display_children(node om.DomNode)
    DEFINE child om.DomNode
    LET child = node.getFirstChild()
    WHILE child IS NOT NULL
        LET child = child.getNext()
        DISPLAY child.toString()
    END WHILE
END FUNCTION