%XML_ELEM_REMOVECHILDREN

Remove all child elements from an element

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

Return value

status

One of the following values:

XML_SUCCESS = The child elements are removed successfully.

XML_FAIL = The child elements are not removed successfully.

Arguments

element

The XML element instance whose child elements will be removed. (XML_ELEM_TYPE)

Discussion

%XML_ELEM_REMOVECHILDREN removes all child elements from an XML element. This function is defined as ^VAL.

Examples

The example below removes all child elements from the root element.

    doc         ,XML_DOC_TYPE
    root        ,XML_ELEM_TYPE

    root = %xml_doc_getroot(doc)

    xcall xml_elem_removechildren(root)