Contains a node list containing the children (for nodes that can have children).
Visual Basic Syntax
Set objXMLDOMNodeList = oXMLDOMNode.childNodes
C/C++ Syntax
HRESULT get_childNodes(
IXMLDOMNodeList **childList);
Parameters
childList
[out]
Note that an IXMLDOMNodeList is returned even if there are no children of the node. In such a case, the length of the list will be set to zero. For information about valid child node types for each node, see DOMNodeType.
C/C++ Return Values
S_OK
Value returned if successful.
E_INVALIDARG
Value returned if childList is null.
Remarks
This value depends on the value of the nodeType property.
NODE_ATTRIBUTE, NODE_DOCUMENT, NODE_DOCUMENT_FRAGMENT, NODE_ELEMENT, NODE_ENTITY, NODE_ENTITY_REFERENCE | Returns an IXMLDOMNodeList that contains a list of all child nodes for the specified node. |
NODE_CDATA_SECTION, NODE_COMMENT, NODE_NOTATION, NODE_PROCESSING_INSTRUCTION, NODE_TEXT | These node types cannot have children. Returns an IXMLDOMNodeList with a length of zero. |
NODE_DOCUMENT_TYPE | Returns an IXMLDOMNodeList that contains a list of all child nodes for the DocumentType node. The node list for a document type node can contain entities and notations. |
You can either use the item method to access individual nodes,
xmlDoc.documentElement.childNodes.item(1)
or you can directly access a child node by appending the desired index number in parentheses,
xmlDoc.documentElement.childNodes(1)
or with square brackets (except in Visual Basic):
xmlDoc.documentElement.childNodes[1]