XML : generate XML string from ORACLE pl sql cursor data

I have a package containing 3 cursors and I need to generate a new XML string as I read through each iteration of cursor 1. I am looping through cursor 1 and loopping through cursor 2 within that and looping through cursor 3 within cursor 2 to build up my row of data. If I simply try to build a string up and append to it as I process through I end up blowing the local variable (limited to 32767). I've tried to write this to a clob column in a table but I get the 'cannot perform a DML operation inside a query' error. To complicate this further, the 3rd party software providers i need to send this to want the XML as a string as an element of a JSON API. Any thoughts would be most appreciated!

No comments:

Post a Comment