How to Convert a Table into XML Document I have a table say SCOTT.DEPT and I want to convert it into an XML document. Is there anyway to accomplish this task?

Kind Regards,
The easiest way to do this is:

select dbms_xmlgen.getxml( 'select * from dept') as xml 
from dual;


There are other way more complicated ways of achieving similar results, but the answer would be significantly longer!