This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
XML SET OPTIONS
|
XML SET OPTIONS ( elementRef | document ; selector ; value {; selector2 ; value2 ; ... ; selectorN ; valueN} ) | ||||||||
Parameter | Type | Description | ||||||
elementRef | document | Text |
![]() |
XML root element reference or Reference of open document | |||||
selector | Longint |
![]() |
Option to set | |||||
value | Longint |
![]() |
Value of option | |||||
The XML SET OPTIONS command is used to modify the value of one or more XML options for the structure passed in the first parameter.
This command applies the XML structures of the "tree" type (DOM) or of the "document" type (SAX). In the first parameter, you can pass either a root element reference (elementRef), or the reference of an open SAX document (document).
Pass the option to be modified in selector and the new value of the option in value. You can pass as many selector/value pairs as you want. You must use the constants described below, placed in the "XML" theme.
Constant | Type | Value | Comment |
XML binary encoding | Longint | 5 | Specifies the way binary data will be converted. Possible values:
|
XML date encoding | Longint | 2 | Specifies the way 4D dates will be converted. For example, !01/01/2003! in the Paris time zone. Possible values:
|
XML indentation | Longint | 4 | Specifies the indentation of the XML document. Possible values:
|
XML picture encoding | Longint | 6 | Specifies the way pictures must be converted (before encoding in Base64). Possible values:
|
XML string encoding | Longint | 1 | Specifies the way 4D strings are converted to element values. It does not concern the conversion to attributes for which XML imposes the use of escape characters. Possible values:
|
XML time encoding | Longint | 3 | Specifies the way 4D times are converted. For example, ?02/00/46? (Paris time). The encoding differs depending on whether you want to express a time or a duration. Possible values for times:
|
Notes:
Constant | Type | Value | Comment |
XML BOM | Longint | 9 | Specifies if XML documents include BOM.
|
XML DOM case sensitivity | Longint | 8 | Specifies the case sensitivity regarding element names for DOM Get XML element and DOM Count XML elements commands. Possible values:
|
XML external entity resolution | Longint | 7 | Controls whether external entities are resolved in XML documents. For security reasons, by default both DOM and SAX 4D XML parsers do not allow external entity resolution. Note that the scope of this selector is the calling process (if preemptive) or all cooperative processes (if called from a cooperative process). It globally applies to all XML documents (the first parameter is ignored, you can pass an empty string). Possible values:
|
XML line ending | Longint | 10 | End-of-line characters in written XML documents.
|
Insertion of an SVG picture:
XML SET OPTIONS($pictElemRef;XML binary encoding;XML data URI scheme)
XML SET OPTIONS($pictElemRef;XML picture encoding;XML native codec)
DOM SET XML ATTRIBUTE($pictElemRef;"xlink:href";PictVar)
DOM SET XML ATTRIBUTE
DOM SET XML DECLARATION
DOM SET XML ELEMENT VALUE
SAX ADD XML ELEMENT VALUE
XML GET OPTIONS
Product: 4D
Theme: XML
Number:
1090
Created: 4D v12
Modified: 4D v16 R4
Modified: 4D v19 R3
4D Language Reference ( 4D v20 R7)