This discussion is archived
1 Reply Latest reply: Sep 27, 2012 8:42 AM by Jason_(A_Non) RSS

XML file manipulation question

Kevin_K Newbie
Currently Being Moderated
I have to generate a big xml file from oracle relational tables, write the output to server and then load it back into a LOB field in the database.

1) I am on Oracle version 11.2.0.3
2) I am able to write the file to a server directory

Is it possible to zip the xml file using oracle preprocessor , read it and then load it back into the database on demand?

Thanks
Kev
  • 1. Re: XML file manipulation question
    Jason_(A_Non) Expert
    Currently Being Moderated
    Why not just store the XML in an XMLTYPE column in the DB. As you are on 11.2.0.3, you will be using the default storage format of SECUREFILE BINARY XML and that provides a compressed form of the XML that is easier for future parsing efforts. I can't speak how it would compare to a .zip version of the XML.

    Without knowing more why you think LOBs need to be involved, I would avoid them completely since they are not setup for efficient XML storage/usage and the XMLType datatype is.

    As for the .zip abilities, some good reference point (that started from)
    [url http://odieweblog.wordpress.com/2012/01/28/xml-db-events-reading-an-open-office-xml-document-xlsx/]XML DB Events : Reading an Open Office XML document (.xlsx)
    and eventually leads you to
    [url http://technology.amis.nl/2010/03/13/utl_compress-gzip-and-zlib/]Utl_compress, gzip and zlib
    [url http://technology.amis.nl/2010/06/09/parsing-a-microsoft-word-docx-and-unzip-zipfiles-with-plsql/]Parsing a Microsoft Word docx, and unzip zipfiles, with PL/SQL

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points