Returns an XML Element object that represents a child element of this element.

GetChildItem(String)

public XmlElement GetChildItem(string name);
Public Function GetChildItem(ByVal name As String) As XmlElement

GetChildItem(String, Int)

public XmlElement GetChildItem(string name, int index);
Public Function GetChildItem(ByVal name As String, ByVal index As Integer) As XmlElement

Parameters

Parameter Description
name Specifies the name of the sub-element.
index Specifies the number of the sub-element beginning with 1. If this value does not match any existing sub-element, an error occurs.

Return Value

The return value is a valid XmlElement object.

Examples

The following 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.

TXTextControl.XmlElement element = textControl1.GetXmlElements("Address").GetItem(2).GetChildItem("Telephone");
Dim Element As TXTextControl.XmlElement = TextControl1.GetXmlElements("Address").GetItem(2).GetChildItem("Telephone")