title: How can I print large XML string generated by Oracle?
body: <p>I need something way bigger than varchar2(2000) to be able to print my generated XML.  Either recommend a better approach than dbms_output.put_line(x) or recommend a different data type to store the result and then print it.  I am an Oracle newbie and full-time job is UI development.</p>
  
  <pre><code>declare
      v_ctx dbms_xmlgen.ctxHandle;
      x varchar2(2000); -- I need something bigger than varchar2(2000)
  begin
      v_ctx := DBMS_XMLGen.newContext('
          select
              baz as "Baz"
          from schema.table_with_10000_rows');
      DBMS_XMLGen.setRowsetTag(v_ctx, 'Foo');
      DBMS_XMLGen.setRowTag(v_ctx, 'Bar');
      x := dbms_xmlgen.getxml(v_ctx);
      dbms_output.put_line(x);
  end;
  </code></pre>