---
title: "XMLDECODE"
description: "The XMLDECODE SQL function returns the XML decoded input."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/xmldecode
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/xmldecode
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

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

## Purpose
The `XMLDECODE` SQL function returns the XML decoded input.

See also [[XMLCOMMENT]], [[XMLELEMENT]], [[XMLENCODE]], [[XMLFORMAT]] and [[XMLTRANSFORM]].

Parameters:
- Input (`varchar2`): the input which will be decoded into XML.

Returns: An object which is the XML decoded input.

## Examples
The following example decodes the XML encoded text `John &amp; CO`:
```sql
select xmldecode('John &amp; CO')

-------------------
John & CO
```
The following example decodes the XML encoded text `65/20&lt;5%`:
```sql
select xmldecode('65/20&lt;5%')

-------------------
65/20<5%
```