dbms_metadata.get_xml
SQL> set long 32000 SQL> set heading off SQL> set pagesize 32000 SQL> spool xml SQL> SQL> select dbms_metadata.get_xml('TABLE', 'emp', 'java2s') from dual; SQL> SQL> spool off SQL> Set heading on SQL> set pagesize 20 SQL> SQL>