To start with here is the bigger picture of the task I\'m trying to do. I need to create a xml file from the results of the particular SQL request and store it in a file on the
Why don't you use DBMS_OUTPUT.PUT instead of DBMS_OUTPUT.PUT_LINE? Give it a try. The trick is to add a newline character after printing your content. You can do it by calling DBMS_OUTPUT.NEW_LINE.