Microsoft XML SDK 2.6 - XML Reference

IXMLDOMNode::hasChildNodes Method

Returns True if this node has children.

Visual Basic Syntax

boolValue = oXMLDOMNode.hasChildNodes

C/C++ Syntax

HRESULT hasChildNodes(
    VARIANT_BOOL *hasChild);

Parameters

hasChild [out]
True is returned if this node has children.

C/C++ Return Values

S_OK
Value returned if successful.
S_FALSE
Value returned when there are no children.
E_INVALIDARG
Value returned if hasChild is Null.

Remarks

This method offers a fast way to determine whether a node has children. It always returns False for nodes that, by definition, cannot have children: the XMLDOMCDATASection, XMLDOMComment, XMLDOMNotation, XMLDOMProcessingInstruction, and XMLDOMText nodes.

See Also

IXMLDOMNode Interface