XMLSerialize Function
-- Oracle XMLSERAILIZE function to obtain indented HTML output

SELECT
 XMLSERIALIZE(Document XMLTYPE(str_html) AS CLOB INDENT SIZE=2) data_output 
FROM (SELECT
 '<html>
  <head>
  <title>Hello World</title>
  <body>
  Hello World
  </body>
  </html>' str_html
 FROM DUAL
);

Oracle XML Functions

Oracle XMLType Table

Oracle registered trademark of Oracle Corporation.

Last Revised On: August 31st, 2014

  343