4D v16.3DOM REMOVE XML ATTRIBUTE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
DOM REMOVE XML ATTRIBUTE
|
DOM REMOVE XML ATTRIBUTE ( elementRef ; attribName ) | ||||||||
Parameter | Type | Description | ||||||
elementRef | Text |
![]() |
XML element reference | |||||
attribName | Text |
![]() |
Attribute to be removed | |||||
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.
Given the following structure:
The following code can be used to remove the first attribute "N=1":
C_BLOB(myBlobVar)
C_TEXT($xml_Parent_Ref;$xml_Child_Ref)
C_LONGINT($LineNum)
$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")
DOM GET XML ATTRIBUTE BY INDEX
DOM GET XML ATTRIBUTE BY NAME
DOM REMOVE XML ELEMENT
DOM SET XML ATTRIBUTE
Product: 4D
Theme: XML DOM
Number:
1084
Created: 4D v12
4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)