Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter FiveGeneral Functions (continued)

CharacterEntityToValue Function

Overview

The CharacterEntityToValue function converts an HTML/XML character entity string to a character value.

Syntax/Parameters

Syntax

dword = CharacterEntityToValue ( string entity, [boolean xml] );

Parameters

entity

A string to convert. It can be an SGML/XML entity name, an HTML 5 entity name, a decimal value or hexadecimal value.

xml

A boolean flag indicating whether to restrict conversion to only XML legal entity names. The default value is FALSE.

Return Value

Returns a dword as the character value or a formatted error code on failure.

Remarks

The function treats all named entities as HTML 5 entity names. HTML 5 entity names are fairly loose, for example, > and > are treated as the same while > is an error in XML or XHTML. Setting the xml parameter to TRUE restricts the named characters to <, >, &, " and '.

Note that Unicode-32 values cannot be directly represented within a wchar data type. In such cases, the value must be encoded as a UTF-16 wstring.

Related Functions

Platform Support

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

Legato IDE, Legato Basic