Salesforce

XMLSetEncoding (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

XMLSetEncoding (Magic xpa 3.x)

Sets the encoding of an XML document that was opened for Write access. The encoding affects both the encoding attribute in the document header, such as encoding=UTF 8, and the encoding of the actual XML document.

Syntax:

XMLSetEncoding (generation, I/O entry, encoding)

Parameters:

generation – A number that represents the task's hierarchic position in the runtime task tree. 0 represents the current task, 1 its immediate ancestor, and so on.

I/O entry – A number that represents the sequence number of the I/O entry in the current task.

encoding – An alpha string representing the encoding used for an XML function to add data to the XML document.

Returns:

A numeric value. If the encoding has been set properly, the function returns 0. If the function fails, Magic xpa returns the following error code:
-3 – The I/O file was not opened in Write mode.

Note:

When the I/O's Media is set to Variable, the encoding is governed by the BLOB variable content type as follows:

  • For Unicode BLOB – The encoding will be UTF-16.

  • For Alpha BLOB – The encoding will be UTF-8.

  • For Binary BLOB – The encoding will be according to the XMLSetEncoding() value.

Exceptions:

This function is not supported for Rich Client tasks.

See also:

XMLGetEncoding

The Online and Rich Client Samples projects (program XM12 and RXM12)

Reference
Attachment 
Attachment