Documentación de Invantiveparte de Invantive Cloud
Foros de Soporte de InvantiveIniciar Sesión / Registrarse

XMLFORMAT

Sintaxis

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

Propósito

La función SQL XMLFORMAT formatea el texto XML de forma legible.

Véase también XMLCOMMENT, XMLDECODE, XMLELEMENT, XMLENCODE y XMLTRANSFORM.

Parámetros:

  • XML (varchar2): código XML que se va a formatear.

Devuelve: el texto XML con formato legible.

Ejemplos

El siguiente ejemplo formatea de forma legible un texto XML compacto:

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

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

El siguiente ejemplo genera un error, ya que el texto XML no es válido; la etiqueta de cierre c no coincide con la etiqueta de apertura a:

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

itgenxml120: XML formatting failed.