次の方法で共有


hasChildNodes Method (Compact 2013)

3/26/2014

Returns True if this node has children.

Syntax

boolValue = oXMLDOMNode.hasChildNodes();
HRESULT hasChildNodes(
  VARIANT_BOOL* hasChild
);

Parameters

Script

None.

C/C++

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

Return Value

Script

Boolean. Returns True if this node has children.

C/C++

  • 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 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.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML DOM Methods