Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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,

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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!

share|improve this answer
    
Thanks buddy. Its done with your example. –  Memon Feb 5 at 11:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.