pras_gupta
asked on
Converting XML File to XMLTYPE
We are trying to load a XML text file to a Oracle XMLTYPE. Any suggestions on this would be really helpful.
Thanks in advance.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The control file would look something like this.
--------------------------
LOAD DATA
INFILE 'file_list.txt'
APPEND INTO TABLE TBL1
FIELDS TERMINATED BY ','
(fname FILLER CHAR(10),
val LOBFILE(fname) TERMINATED BY EOF)
--------------------------
Where file_list.txt is a plain text file with the name of your xml documents.
For example the contents would look like:
one.xml
two.xml
Where one.xml and two.xml are the xml files to be loaded. and the column VAL is of XMLTYPE in your table.