This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
SAX SET XML DECLARATION
|
SAX SET XML DECLARATION ( document ; encoding {; standalone} ) | ||||||||
Parameter | Type | Description | ||||||
document | DocRef |
![]() |
Reference of open document | |||||
encoding | String |
![]() |
XML document character set | |||||
standalone | Boolean |
![]() |
True = the document is standalone False (default) = document is not standalone | |||||
The SAX SET XML DECLARATION command initializes the XML document referenced in document using the specified encoding. Optionnally, you can set the standalone attribute.
Note: You can specify the indentation of the document thanks to the XML SET OPTIONS command before writing anything.
This command must be called one time per document and before the first XML set command in the document; otherwise, an error message will be generated.
The following code:
SAX SET XML DECLARATION($DocRef;"UTF-16";True)
... will write this line in the document:
<<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
Product: 4D
Theme: XML SAX
Number:
858
Created: 4D 2004
Renamed: 4D v12 (SAX SET XML OPTIONS)
Modified: 4D v12
4D Language Reference ( 4D v20 R7)