RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLNodeCollection.AddItem Method

Adds a new repetition of the repeating child element to this node.

Pascal
function AddItem(Index: Integer): IXMLNode; virtual;
C++
virtual __fastcall IXMLNode AddItem(int Index);

Applications can't call the protected AddItem method. It is used internally to create a new child node for this node that is an instance of the repeating element. The new child node is given the first tag name listed by the ItemTag property. 

Index indicates the position of the new child node in this node's list of children, where 0 is the first position, 1 is the second position, and so on. If Index is –1, the new node is added to the end.

Note: Index refers to the list of repeating elements (the List property), not the list of all children (the ChildNodes property).
AddItem returns the interface for the newly created child node. 

 

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