RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLNode.CreateCollection Method

Creates an instance of a TXMLNodeCollection descendant and returns it.

Pascal
function CreateCollection(const CollectionClass: TXMLNodeCollectionClass; const ItemInterface: TGuid; const ItemTag: DOMString; ItemNS: DOMString = ''): TXMLNodeCollection;
C++
__fastcall TXMLNodeCollection CreateCollection(const TXMLNodeCollectionClass CollectionClass, const TGuid ItemInterface, const DOMString ItemTag, DOMString ItemNS = '');

Applications can't call the protected CreateCollection method. It is used internally to generate the collections that are listed in the HostedNodes property. 

CollectionClass specifies the class (a TXMLNodeCollection descendant) that implements the collection of child nodes. 

ItemInterface specifies the interface for each child node in the collection. 

ItemTag specifies the tag name for each child node in the collection. 

ItemNS specifies the namespace in which ItemTag is defined. 

CreateCollection returns the new hosted collection node. This new node has the same parent node, DOM interface, attribute nodes, and child nodes as this node, but it also maintains a list of only those child nodes with the specified tag and interface. The new collection node lists this node as the value of its HostNode property.

Note: CreateCollection raises an exception if this is a hosted node.
 

 

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