XMLELEMENT
Sintassi
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> XMLELEMENT[XMLELEMENT]:::quoted
XMLELEMENT --> End((END))
Scopo
La funzione SQL XMLELEMENT formatta un valore come elemento XML con il nome di tag specificato.
Vedi anche XMLCOMMENT, XMLDECODE, XMLENCODE, XMLFORMAT e XMLTRANSFORM.
Parametri:
- Tag (
varchar2): nome dell'elemento XML. - Valore (
varchar2,decimalodatetime): valore da includere nell'elemento XML. - Mostra null (facoltativo,
boolean): se restituire un elemento conxsi:nil="true"per un valorenull(true) oppurenull(false). Il valore predefinito ètrue.
Restituisce: un testo con il valore formattato come elemento XML.
Esempi
Il seguente esempio formatta il testo val come elemento XML con nome di tag Tag:
select xmlelement('Tag', 'val')
-------------------
<Tag>val</Tag>
Il seguente esempio formatta un valore null come elemento XML con nome di tag Tag:
select xmlelement('Tag', null)
-----------------------------------------------------------------------------
<Tag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />