TXTextControl.XMLElements.Remove Method

Removes an XML element from an XMLElements collection.

Syntax

   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.

Return Value


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.

Data Types

Index:    Long
Return value:    Integer

Example

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

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

See Also