Documentation Invantiveune partie de Invantive cloud
Forums d'Invantive SupportConnectez-vous/inscrivez-vous

XMLFORMAT

Syntaxe

%%{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))

Objet

La fonction SQL XMLFORMAT permet de mettre en forme le texte XML.

Voir aussi XMLCOMMENT, XMLDECODE, XMLELEMENT, XMLENCODE et XMLTRANSFORM.

Paramètres :

  • XML (varchar2) : code XML à mettre en forme.

Renvoie : le texte XML formaté de manière lisible.

Exemples

L'exemple suivant formate de manière lisible un texte XML concis :

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

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

L'exemple suivant génère une erreur car le texte XML n'est pas valide ; la balise de fermeture c ne correspond pas à la balise d'ouverture a :

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

itgenxml120: XML formatting failed.