InvantiveのドキュメントInvantive Cloudの一部
Invantive サポートフォーラムログイン / 会員登録

XMLFORMAT

構文

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

目的

The XMLFORMAT SQL function pretty-prints xml text.

関連項目:XMLCOMMENT、XMLDECODE、XMLELEMENT、XMLENCODE、XMLTRANSFORM。

パラメータ:

  • Xml (varchar2): xml to pretty-print.

Returns: the pretty-printed XML text.

例

The following example pretty-prints a compact XML text:

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

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

The following example raises an error since the XML text is invalid; the end tag c does not match the start tag a:

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

itgenxml120: XML formatting failed.