1 2 Previous Next 16 Replies Latest reply: Jun 27, 2012 5:42 AM by Oracle_Walker Go to original post RSS
      • 15. Re: XML to CLOB & UTF-8 Queries
        odie_63
        OK, XMLRoot is deprecated. Be cautious in using the plural ;)

        If you need a formatted output (which shouldn't be necessary except in the dev phase), you can call XMLSerialize function :
        select '<?xml version="1.0" encoding="UTF-8"?>' ||
               XMLSerialize(document
                 xmlelement("root",
                   xmlagg(
                     xmlelement("emp",
                       xmlelement("name", ename)
                     , xmlelement("hiredate", hiredate)
                     )
                   )
                 ) 
                 as clob indent
               )
        into ...
        from EMP_DETAILS;
        • 16. Re: XML to CLOB & UTF-8 Queries
          Oracle_Walker
          Thank you Odie.

          Edited by: Balaji on Jun 27, 2012 4:12 PM
          1 2 Previous Next