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
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?

  • 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, 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]XML DB Events : Reading an Open Office XML document (.xlsx)
    and eventually leads you to
    [url]Utl_compress, gzip and zlib
    [url]Parsing a Microsoft Word docx, and unzip zipfiles, with PL/SQL


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