Routines (alphabetical) > Object Classes > File Format Object Classes > IDLffXMLDOMTreeWalker::FirstChild

# IDLffXMLDOMTreeWalker::FirstChild

The IDLffXMLDOMTreeWalker::FirstChild function method creates an object that is a subclass of IDLffXMLDOMNode and returns the object reference to that object. The object refers to the node in the DOM tree that is the first child of the node to which the walker is currently pointing.

If the current node has no visible children, this method returns a null object reference, and the current node does not change. Otherwise, the DOM tree node to which the returned object refers becomes the current node in the tree walker.

This method destroys the object returned by the most recent previous invocation of any of the following navigation methods:

- IDLffXMLDOMTreeWalker::FirstChild
- IDLffXMLDOMTreeWalker::GetCurrentNode
- IDLffXMLDOMTreeWalker::LastChild
- IDLffXMLDOMTreeWalker::NextNode
- IDLffXMLDOMTreeWalker::NextSibling
- IDLffXMLDOMTreeWalker::ParentNode
- IDLffXMLDOMTreeWalker::PreviousNode
- IDLffXMLDOMTreeWalker::PreviousSibling

A node object returned by this method is destroyed when the tree walker is destroyed.

## Syntax

Result = Obj->[IDLffXMLDOMTreeWalker::]FirstChild()

## Return Value

Returns an object reference to the first child of the node in the DOM tree to which the tree walker is pointing, or a null object reference if the current node has no visible children.

## Arguments

None

## Keywords

None

## Version History

6.2 | Introduced