Removes an XML element from an XMLElements collection.
XMLElements.Remove Index
Parameter | Description | |
Index |
Specifies the position of the XML element in the collection. It must be a number from 1 to the value of the collection's Count property. If this value does not match any existing member of the collection, an error occurs. |
Parameter | Description | |
0 | An error has occurred. | |
1 | The element could not be removed because the document becomes invalid according to the document's DTD. In this case Text Control fires an XMLInvalid event. | |
2 | The new element has been successfully removed. |
Index: | Long |
Return value: | Integer |
The following Basic example removes the second Address element of an XML document that contains addresses:
TXTextControl1.XMLElements("Address").Remove(2)