This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
DOM SET XML ELEMENT NAME
|
DOM SET XML ELEMENT NAME ( elementRef ; elementName ) | ||||||||
Parameter | Type | Description | ||||||
elementRef | String |
![]() |
XML element reference | |||||
elementName | String |
![]() |
New name of element | |||||
The DOM SET XML ELEMENT NAME command modifies the name of the element set by elementRef.
Pass the reference of the element to rename in elementRef and the new name of the element in elementName. The command also takes charge of updating the open and close tags of the element.
In the following XML source:
<Book> <Title>The Best Seller</Title> </Book>
If the following code is executed, with vElemRef containing the reference to the ‘Book’ element:
DOM SET XML ELEMENT NAME(vElemRef;"BestSeller")
We get:
<BestSeller> <Title>The Best Seller</Title> </BestSeller>
If the command was executed correctly, the system variable OK is set to 1. Otherwise, it is set to 0 and an error is generated.
An error is generated when:
Product: 4D
Theme: XML DOM
Number:
867
Created: 4D 2004
4D Language Reference ( 4D v20 R7)