%XML_ELEMLIST_REMOVE

Remove an element from an XML element list

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
status = %XML_ELEMLIST_REMOVE(elem_list, element)

Arguments

status

XML_SUCCESS if the element was removed from the list. (i4)

elem_list

The XML element list instance. (XML_ELEMLIST_TYPE)

element

The XML element instance to remove from the list. (XML_ELEM_TYPE)

Discussion

%XML_ELEMLIST_REMOVE removes the XML element from the list but does not delete the element.

If you remove an element from a list and don’t add it to another list, you must call %XML_ELEM_DELETE to delete that element and release its associated memory.

Examples

The example below assumes an XML element list called elist has an element whose name is child1.

child, XML_ELEM_TYPE
child = %xml_elemlist_findtag(elist, "child1")
if (child)
  begin
    ret = %xml_elemlist_remove(elist, child)
  end