Returns an XML Element object that represents a child element of this element.
public XmlElement GetChildItem(string name);
Public Function GetChildItem(ByVal name As String) As XmlElement
public XmlElement GetChildItem(string name, int index);
Public Function GetChildItem(ByVal name As String, ByVal index As Integer) As XmlElement
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. |
The return value is a valid Xml
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")