Xml.XMLDoc.TXMLNodeCollection.AddItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddItem(Index: Integer): IXMLNode; virtual;

C++

virtual Xml::Xmlintf::_di_IXMLNode __fastcall AddItem(int Index);

Properties

Type Visibility Source Unit Parent
function protected
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc TXMLNodeCollection

Description

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

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.

See Also