---
title: "XMLENCODE"
description: "La funzione SQL XMLENCODE restituisce l\u0027input codificato in XML."
language: it
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/it/docs/invantive-universalsql/grammar/sql-functions/xmlencode
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/xmlencode
updated: 2026-12-02T12:11:54Z
license: https://documentation.invantive.eu/it/
---

## Sintassi
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> XMLENCODE[XMLENCODE]:::quoted
    XMLENCODE --> End((END))
```

## Scopo
La funzione SQL `XMLENCODE` restituisce l'input codificato in XML.

Vedi anche [[XMLCOMMENT]], [[XMLDECODE]], [[XMLELEMENT]], [[XMLFORMAT]] e [[XMLTRANSFORM]].

Parametri:
- Input (`varchar2`, `decimal` o `datetime`): l'input che verrà codificato in XML.

Restituisce: un oggetto che rappresenta l'input codificato in XML.

## Esempi
L'esempio seguente codifica il testo `John & CO`:
```sql
select xmlencode('John & CO')

-------------------
John &amp; CO
```
L'esempio seguente codifica il testo `65/20<5%`:
```sql
select xmlencode('65/20<5%')

-------------------
65/20&lt;5%
```

