What would be the fastest, easy, and quickest way to import an xml data to a database table in Oracle 10g database? What tool should I use (if possible free)?

The XML will look like this:

<?xml version="1.0" encoding="utf-8"?>
<badges>
  <row Id="82946" UserId="3718" Name="Teacher" Date="2008-09-15T08:55:03.923" />
  <row Id="82947" UserId="994" Name="Teacher" Date="2008-09-15T08:55:03.957" />
  <row Id="82948" UserId="3372" Name="Teacher" Date="2008-09-15T08:55:03.957" />
  <row Id="82949" UserId="3893" Name="Teacher" Date="2008-09-15T08:55:03.957" />
  <row Id="82950" UserId="4591" Name="Teacher" Date="2008-09-15T08:55:03.957" />
  <row Id="82951" UserId="5196" Name="Teacher" Date="2008-09-15T08:55:03.957" />
  <row Id="82952" UserId="2635" Name="Teacher" Date="2008-09-15T08:55:03.957" />
  <row Id="82953" UserId="1113" Name="Teacher" Date="2008-09-15T08:55:03.957" />
  <row Id="82954" UserId="4182" Name="Teacher" Date="2008-09-15T08:55:03.957" />
</badges>
link|improve this question

71% accept rate
feedback

1 Answer

up vote 0 down vote accepted

What are you importing this file into?

See this question on stackoverflow: Oracle: loading a large xml file?

You can use SQL*Plus with some PL/SQL to import XML into your DB.

link|improve this answer
I actually just saw that post last night... I don't know how I can put it inside the directory – EquinoX Mar 23 '11 at 16:00
@equinox: You would create the directory Object in Oracle, then move the file in said directory using your operating system. – Vincent Mar 23 '11 at 16:27
I have created a directory in Oracle.. I don't know how to move the file using the operating system.. this is a remote database that I have.. I only have IP address of the host name, username, and password – EquinoX Mar 23 '11 at 17:11
@equinox: the directory object points to a directory on the server itself. You must upload your file on the server somehow: this is a server-side method, not a client-side one. – Vincent Mar 23 '11 at 19:38
So maybe I should use FTP to transfer the file to the server? – EquinoX Mar 23 '11 at 20:08
show 1 more comment
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.