XMLFORMAT
Syntaksi
%%{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))
Tarkoitus
The XMLFORMAT SQL function pretty-prints xml text.
See also XMLCOMMENT, XMLDECODE, XMLELEMENT, XMLENCODE and XMLTRANSFORM.
Parametrit:
- Xml (
varchar2): xml to pretty-print.
Returns: the pretty-printed XML text.
Esimerkkejä
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.