This procedure parses a JSON-formatted varchar2 or CLOB and converts it to an xmltype.
Syntax
APEX_JSON.TO_XMLTYPE (
    p_source   IN VARCHAR2,
    p_strict   IN BOOLEAN DEFAULT TRUE )
RETURN sys.xmltype;
APEX_JSON.TO_XMLTYPE (
    p_source   IN CLOB,
    p_strict   IN BOOLEAN DEFAULT TRUE )
RETURN sys.xmltype;
Parameters
Table 15-35 TO_XMLTYPE Function Parameters
| Parameter | Description | 
|---|---|
| 
 | The JSON source ( | 
| 
 | If TRUE (default), enforce strict JSON rules | 
Returns
Table 15-36 TO_XMLTYPE Function Returns
| Return | Description | 
|---|---|
| 
 | An  | 
Example
This example parses JSON and prints the XML representation.
DECLARE
    l_xml xmltype;
BEGIN
    l_xml := apex_json.to_xmltype('{ "items": [ 1, 2, { "foo": true } ] }');
    dbms_output.put_line(l_xml.getstringval);
END;