|How to dump table into XML format? [message #269829]
||Mon, 24 September 2007 15:18
Registered: January 2009
Oracle V10.2.0.2 on Linux|
My eventual goal is to dump an Oracle table into XML formatted file.
From AskTom I found:
If you haven't already, you need to download and install the latest Oracle XML
Developer's Kits (XDK's). What you are trying to do is relatively simple, and with the
XDK, you can generate XML from SQL queries using PL/SQL, Java, C or C++. The following
command on the command line generates an XML document containing the first 4 rows of the
$ java OracleXML getXML -user "scott/tiger" "select * from emp where rownum < 5" > emp.xml
So I went to http://otn.oracle.com to obtain the XDK from:
Which says as follows:
Install GNU gzip.
Download the Oracle XDK for Java in .tar format
Extract the distribution package into a directory. (Ex: #gzip -dc xdk.tar | tar xvf -)
The result should be the following files and directories:
/bin - xdk executables and utilities
/nls/data - nls data files
/lib - directory for libraries
/xdk - top xdk directory
/xdk/demo - directory for demo files
/xdk/doc - directory for documentation
/xdk/admin - direcory for dband config files
/xdk/mesg - error message files
/xdk/*html. - doc navigation files
/xdk/license.html - copy of license agreement
However what I found after completing the installation is as follows:
[root@dbx1 xml]# ls -l
drwxr-xr-x 2 47755 610 4096 Mar 17 2006 bin
drwxr-xr-x 2 47755 610 4096 Mar 17 2006 jlib
drwxr-xr-x 2 47755 610 4096 Mar 17 2006 lib
drwxr-xr-x 5 47755 610 4096 Apr 6 2006 xdk
Since what I got does not match what I was told to expect & since no file "OracleXML"
exists in this new directory tree, I am at a loss as to how best to proceed.
I'd appreciate a free clue on how to generate 1 file per Oracle table in XML format;
either with what I already have or that I cam easily obtain.