TX Text Control ActiveX

ChildItem Method

Method

Returns an XMLElement object that is a child element of this element. If this element has more than one sub-elements of the type with the given name the optional Index parameter can be used to specify the subelement. If Index is omitted Text Control returns the first sub-element with the given name.

Syntax

XMLElement.ChildItem ElementName[, Index]

Parameters

ParameterDescription
ElementNameSpecifies the name of the sub-element.
IndexOptional. Specifies the number of the subelement. If this value does not match any existing sub-element, an error occurs.

Return Value

The method returns an XMLElement object.

Examples

The following Basic example gets the Telephone element from the second address in an XML document that contains addresses consisting of the sub-elements Name, Street, City and Telephone:

Dim Telephone As String
Set Addresses = TXTextControl1.XMLElements("Address")
Telephone = Addresses(2).ChildItem("Telephone")

See Also