SAX SET XML OPTIONS

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 2004


SAX SET XML OPTIONS (document; encoding{; standalone{; indentation}})

ParameterTypeDescription
documentDocRefReference of open document
encodingStringXML document character set
standaloneBooleanTrue = the document is standalone
False (default) = document is not standalone
indentationBooleanTrue (default) = document is indented
False = document is not indented

Description

The SAX SET XML OPTIONS command initializes the XML document referenced in document using the values passed in the parameter. These parameters allow determining the encoding, standalone attribute and document indentation.

encoding: Indicates the character set used in the document. By default (if the command is not called), the UTF-8 character set (compressed Unicode) is used.

standalone: Indicates whether the document is standalone (True) or if it needs other files or external resources to operate (False). By default (if the command is not called or if the parameter is omitted), the document is not standalone.

indentation: Indicates whether the document should display indentations corresponding to XML key hierarchies (True) or not (False). By default (if the command is not called or if the parameter is omitted), the document is indented.

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.

Example

The following code:

   SAX SET XML OPTIONS($DocRef;"UTF-16";True)

... will write this line in the document:

<?xml version="1.0" encoding="UTF-16" standalone="yes"?>

See Also

SAX GET XML DOCUMENT VALUES.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next