I have a largeish query, intended to produce a 6MB 'physical' XML document, (to be uploaded to another system) from a standard SQL database. The tail end of which looks like this:
thisxmltype := dbms_xmldom.getXmlType(domdoc);
dbms_output.enable(null);
print_clob(thisxmltype.getClobVal );
dbms_xmldom.freeDocument(domdoc);
I then save the output from dbms_output but after (every) 10,268 characters I'm finding a return character, right in the middle of an XML tag name, or sometimes value, which invalidates the whole thing.
Any suggestions on how to avoid this sort of result:
<POSTCODE>EH99 1AA</POSTCODE>
<RE
ASON>99</REASON>
<REASON_OTHER/>