Xml.XMLIntf.IXMLNode.Collection

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Collection: IXMLNodeCollection read GetCollection;

C++

__property _di_IXMLNodeCollection Collection = {read=GetCollection};

Properties

Type Visibility Source Unit Parent
property public
Xml.XMLIntf.pas
Xml.XMLIntf.hpp
Xml.XMLIntf IXMLNode

Description

Indicates the collection in which this node appears.

Read Collection to determine whether this node is one of a repeating set of child nodes. The node specified by Collection represents the same node in the XML document as this node's ParentNode property, but it is specialized to work with this node and any other child nodes of the same type.

For example, consider the following XML fragment:

<students>
<student name="John Smith">
<grade>incomplete</grade>
</student>
<student name="Jane Doe">
<grade>B+</grade>
</student>
<auditor name="Bill Jones"></auditor>
</students>

If this node represents one of the <student> nodes, then ParentNode represents the <students> node, and Collection represents a copy of the <students> node that is used for only those children that are <student> nodes, and not the <auditor> nodes.

If this node does not represent one of a set of repeating child elements, Collection is nil (Delphi) or NULL (C++).

See Also