RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IDOMNode.childNodes Property

Represents the child nodes of the node.

Pascal
property childNodes: IDOMNodeList;
C++
__property IDOMNodeList childNodes;

The childNodes property lists the nodes that are children of this DOM node. If this node has no child nodes, childNodes is the interface of an empty list.  

You can use childNodes to iterate through a node's children, or you can the firstChild and lastChild properties along with the nextSibling method on each child node.

Note: Attributes are not considered child nodes of a node. To get the values of this node's attributes, use the attributes property instead.
Note: IDOMNode identifies child nodes slightly differently than does the IXMLNode interface. When using the DOM, the values of many nodes are treated as separate child nodes, where the two are merged when using IXMLNode. For example, given the following fragment from an XML document:

<Time>8:00 pm est</Time>

Note: The DOM parses this string into two nodes: the <Time> node (an element node), and a single child node of the <Time> node (an text node with the value '8:00 pm est'). IXMLNode treats this as a single node with the name 'Time' and the value '8:00 pm est'.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!