## Syntax ```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)) ``` ## Purpose The `XMLENCODE` SQL function returns the XML encoded input. See also [[XMLCOMMENT]], [[XMLDECODE]], [[XMLELEMENT]], [[XMLFORMAT]] and [[XMLTRANSFORM]]. Parameters: - Input (`varchar2`, `decimal` or `datetime`): the input which will be encoded into XML. Returns: An object which is the XML encoded input. ## Examples The following example encodes the text `John & CO`: ```sql select xmlencode('John & CO') ------------------- John &amp; CO ``` The following example encodes the text `65/20<5%`: ```sql select xmlencode('65/20<5%') ------------------- 65/20&lt;5% ```