deleteObject (target : xlink, [recursive : boolean]) : boolean
The method “deleteObject()” deletes elements from the structure. For the parameter “xlink”, the XLink of the element to be deleted is specified. If the element to be deleted has child elements, then “recursive” must be specified.
The parameter “recursive” implicitly holds the value “false()”. If “recursive” is therefore not specified or is specified with the value “false()”, it is assumed that the element to be deleted does not have any child elements. If there are child elements however, then the element cannot be deleted. The method then returns “false”.
In the example, the object is deleted on which the method is called. If it cannot be said for sure that the object has no children, the parameter “recursive” should be specified with “true()” as in the example.