---
title: "XMLENCODE"
description: "La fonction SQL XMLENCODE renvoie l\u0027entr\u00E9e encod\u00E9e en XML."
language: fr
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/fr/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/fr/
---

## Syntaxe
```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))
```

## Objet
La fonction SQL `XMLENCODE` renvoie la donnée d'entrée encodée au format XML.

Voir aussi [[XMLCOMMENT]], [[XMLDECODE]], [[XMLELEMENT]], [[XMLFORMAT]] et [[XMLTRANSFORM]].

Paramètres :
- Entrée (`varchar2`, `decimal` ou `datetime`) : l'entrée qui sera encodée au format XML.

Retourne : un objet correspondant à l'entrée encodée au format XML.

## Exemples
L'exemple suivant encode le texte `John & CO` :
```sql
select xmlencode('John & CO')

-------------------
John &amp; CO
```
L'exemple suivant encode le texte `65/20<5%` :
```sql
select xmlencode('65/20<5%')

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

