From RAD Studio API Documentation
Jump to: navigation, search


property Collection: TXMLNodeCollection read FCollection write FCollection;


__property TXMLNodeCollection* Collection = {read=FCollection, write=FCollection};


Type Visibility Source Unit Parent
property protected


Indicates the collection in which this node appears.

Collection indicates the collection that contains this node if it represents 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.

The node identified by Collection is one of the collections listed by the parent node's HostedNodes property, and it lists ParentNode as the value of its HostNode property.

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.

Applications can't use this protected property to access the Collection that contains this node. Instead, they use the Collection property of the IXMLNode interface for this node.

See Also