Was this helpful?
RemoveChild Method
The RemoveChild method removes a child or all child nodes from the Children list. If the child attribute is specified, the specified child is removed. If position is given, the child at this position is removed.
If name is given, the first child or all children (if allchildren=TRUE) XMLElements with the given name are removed. If recursive=TRUE, then children of all removed children are recursivly removed.
This method has the following syntax (see following note):
integer = XMLElement.RemoveChild(
          child = XMLNode,
          position = integer,
          name = varchar(256),
          allchildren = integer,
          [, recursive = integer])
Note:  Only one of the first four parameters must be specified, although you may specify more than one or all of them. If you specify more than one parameter, they are considered in this order: child, position, name, allchildren.
This method has the following parameters:
name
Specifies the name of the child node to remove
allchildren
Specifies that all child nodes of the XMLElement should be removed. If name is specified, all child XMLElements with that name are removed.
position
Specifies the position of the child node in the list of children
child
Specifies the child node to be removed
recursive
Specifies that all children of removed children also be removed
If the method is successful, it returns ER_OK; otherwise, it returns ER_FAIL. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.
Last modified date: 12/20/2023