Generate XML - DBMS_XMLGEN

Posted by Shaaf's blog on Wednesday, December 10, 2008

On my way to my solution store just found this nice to use, old and easy feature. Possibilities endless, usage typically very easy.

I used the following to generate XML from sqlplus:

select dbms_xmlgen.getxml('select * from user') from dual;

Output: < ROWSET > < ROW > < TNAME >Employee< / TNAME > < TABTYPE > TABLE < / TABTYPE > < / ROW > < / ROWSET >