Jul 4, 2013

XML nodes over 64K in size cannot be printed when using Binary XML Storage [Oracle] [Solved]

Posted Jul 4, 2013
If you're using Binary XML Storage and you used DBMS_XSLPROCESSOR's CLOB2FILE method to write to file, there is a chance that you'll encounter the 64K limit of nodes.

The workaround is to use another method to write XMLType to file: DBMS_XMLDOM's WRITETOFILE:

Declare your desired directory:

create or replace DIRECTORY XMLDIR AS 'C:\tmp';


Use dbms_xmldom to write XMLType column to file:

declare
  doc DBMS_XMLDOM.DOMDocument;
BEGIN
  for c in (select xml_col from xml_table x where key_col='mykey') loop
    doc := DBMS_XMLDOM.NewDomDocument(c.xml_col);
    DBMS_XMLDOM.WRITETOFILE(doc, 'XMLDIR/output.xml');
end loop;
/

1 comment:

  1. Titanium Network Surf freely | TeamSpeak
    Our ford edge titanium for sale professional surf enthusiasts will find plenty of titanium chainmail opportunities 출장마사지 for the highest tier of quality titanium app equipment at titanium rod in femur complications any given time. To receive this type of

    ReplyDelete