Syntax
XMLElements.Remove Index
Parameters
| 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. |
Return Value
| Value | 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 element has been successfully removed. |
Data Types
| Name | Data type |
|---|
| Index | Long |
| Return value | Integer |
Examples
The following Basic example removes the second Address element of an XML document that contains addresses:
TXTextControl1.XMLElements("Address").Remove(2)