Compartilhar via


hasChildNodes Method

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Returns True if this node has children.

Script Syntax

            boolValue = oXMLDOMNode.hasChildNodes();

Remarks

Script Parameters

None.

Script Return Value

Boolean. Returns True if this node has children.

C/C++ Syntax

HRESULT hasChildNodes(
  VARIANT_BOOL* hasChild
);

Remarks

C/C++ Parameters

  • hasChild
    [out, retval] 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.

Requirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

General 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 IXMLDOMCDATASection, IXMLDOMComment, IXMLDOMNotation, IXMLDOMProcessingInstruction, and IXMLDOMText nodes.

This method applies to the following objects and interfaces:

IXMLDOMCDATASection, IXMLDOMComment, IXMLDOMNotation, IXMLDOMProcessingInstruction, IXMLDOMText, IXMLDOMAttribute, IXMLDOMCDATASection, IXMLDOMCharacterData, IXMLDOMComment, DOMDocument, IXMLDOMDocumentFragment, IXMLDOMDocumentType, IXMLDOMElement, IXMLDOMEntity, IXMLDOMEntityReference, IXMLDOMNode, IXMLDOMNotation, IXMLDOMProcessingInstruction, IXMLDOMText, and IXTLRuntime.