Skip to main content
Version: 20 R7 BETA

DOM REMOVE XML ATTRIBUTE

DOM REMOVE XML ATTRIBUTE ( elementRef ; attribName )

ParameterTypeDescription
elementRefTextXML element reference
attribNameTextAttribute to be removed

Description

The DOM REMOVE XML ATTRIBUTE command removes, if it exists, the attribute designated by attribName from the XML element whose reference is passed in the elementRef parameter.

If the attribute has been correctly removed, the OK system variable is set to 1. If no attribute named attribName exists in elementRef, an error is returned and the OK system variable is set to 0.

Example

Given the following structure:

The following code can be used to remove the first attribute "N=1":

 var myBlobVar : Blob
 var $xml_Parent_Ref;$xml_Child_Ref : Text
 var $LineNum : Integer
 
 $xml_Parent_Ref:=DOM Parse XML variable(myBlobVar)
 $xml_Child_Ref:=DOM Get first child XML element($xml_Parent_Ref)
 DOM REMOVE XML ATTRIBUTE($xml_Child_Ref;"N")

See also

DOM GET XML ATTRIBUTE BY INDEX
DOM GET XML ATTRIBUTE BY NAME
DOM REMOVE XML ELEMENT
DOM SET XML ATTRIBUTE