Xml.xmldom.IDOMNode.childNodes

From RAD Studio API Documentation
Jump to: navigation, search


Delphi

property childNodes: IDOMNodeList read get_childNodes;

C++

__property _di_IDOMNodeList childNodes = {read=_scw_get_childNodes};

Properties

Type Visibility Source Unit Parent
property public
Xml.Xmldom.pas
Xml.xmldom.hpp
Xml.xmldom IDOMNode

Description

Represents the child nodes of the node.

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

See Also