TX Text Control ActiveX

Remove Method

Method

Removes an XML element from an XMLElements collection.

Syntax

XMLElements.Remove Index

Parameters

ParameterDescription
IndexSpecifies 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

ValueDescription
0An error has occurred.
1The 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.
2The element has been successfully removed.

Data Types

NameData type
IndexLong
Return valueInteger

Examples

The following Basic example removes the second Address element of an XML document that contains addresses:

TXTextControl1.XMLElements("Address").Remove(2)

See Also