Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FiveGeneral Functions (continued)

XMLTextToANSI Function

Overview

The XMLTextToANSI function converts XML character entities to ANSI text.

Syntax/Parameters

Syntax

string = XMLTextToANSI ( string data );

Parameters

data

A string to convert.

Return Value

Returns a string containing data converted. Use the IsError and GetLastError functions to retrieve error information.

If the string overflows, the buffer will be clipped near the 2MB limit.

Remarks

The XMLTextToANSI function is meant to process well formed ANSI data from XML. It converts SGML escaped characters (‘<’, ‘>’, and ‘&’) to ANSI. This function does not convert HTML named character entities. Erroneous character will be replaced with ‘?’ characters. Unicode characters will be down converted to ANSI characters as possible. Codes that cannot be converted are treated as errors. See the SGML chapter for a more comprehensive conversion.

The maximum size of the string is 2MB.

Note that the error count will be in the lower portion of the error code returned by the GetLastError function (and & with ERROR_CODE_MASK to remove the error code).

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic