RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IXMLNode.Collection Property

Indicates the collection in which this node appears.

Pascal
property Collection: IXMLNodeCollection;
C++
__property IXMLNodeCollection Collection;

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++). 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!