---
title: "XMLCOMMENT"
description: "La fonction SQL XMLCOMMENT met en forme un texte sous forme de commentaire XML."
language: fr
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/fr/docs/invantive-universalsql/grammar/sql-functions/xmlcomment
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/xmlcomment
updated: 2026-12-04T14:54:51Z
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)) --> XMLCOMMENT[XMLCOMMENT]:::quoted
    XMLCOMMENT --> End((END))
```

## Objet
La fonction SQL `XMLCOMMENT` permet de mettre en forme un texte sous forme de commentaire XML.

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

Paramètres :
- Entrée (`varchar2`) : l'entrée qui sera mise en forme sous forme de commentaire XML.

Renvoie : une chaîne de caractères contenant la valeur saisie sous forme de commentaire XML.

## Exemples
L'exemple suivant formate le texte `a -b c` en tant que commentaire XML :
```sql
select xmlcomment('a -b c')

-------------------
<!-- a -b c -->
```
L'exemple suivant formate le texte `a --b c` sous forme de commentaire XML, en séparant le double tiret qui n'est pas autorisé dans un commentaire XML :
```sql
select xmlcomment('a --b c')

-------------------
<!-- a - -b c -->
```

