Documentazione Invantiveparte di invantive cloud
Forum di supporto InvantiveAccedi / Registrati

XMLFORMAT

Sintassi

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

Scopo

La funzione SQL XMLFORMAT formatta in modo leggibile il testo XML.

Vedi anche XMLCOMMENT, XMLDECODE, XMLELEMENT, XMLENCODE e XMLTRANSFORM.

Parametri:

  • XML (varchar2): codice XML da formattare in modo leggibile.

Restituisce: il testo XML formattato in modo leggibile.

Esempi

L'esempio seguente formatta in modo leggibile un testo XML compatto:

select xmlformat('<r><name>peter</name></r>')

-------------------
<?xml version="1.0" encoding="utf-8"?>
<r>
  <name>peter</name>
</r>

L'esempio seguente genera un errore poiché il testo XML non è valido; il tag di chiusura c non corrisponde al tag di apertura a:

select xmlformat('<root><a>b</c></root>')

itgenxml120: XML formatting failed.