---
name: "XMLentities.literalToEntity"
section: "3kaya"
platform: "linux"
package: "kaya"
version: "0.4.4-6.2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/XMLentities.literalToEntity"
---

# XMLentities.literalToEntity(3kaya)

Convert literal characters to XML entities

## NAME

XMLentities::literalToEntity - Convert literal characters to XML entities

## SYNOPSIS

**String literalToEntity(** *String text* **)**

## ARGUMENTS

**text** The text to convert

## DESCRIPTION

Return a String with all of the literal characters outside the strict 7-bit ASCII subset converted to XML entities. For example **Char(220)**  would be replaced with **&amp;#220;**

An Exception is thrown if the input string contains any literal characters not legal in XML documents (or are in the range 128-159, for which the behaviour is undefined).

## AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

## LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

## RELATED

**XMLentities.entityToLiteral (3kaya)**
