Jump to content

Load XML records in a normal table


Recommended Posts

I have a very simple question:I get a XML file and want to store that data in my Oracle database in a normal table.I have seen so many answers everywhere, varying from LOBs and using xDB etc.What i don't understand is why it is so difficult.When i want to load a CSV file in a table I make a very small Control File CTL and from the command prompt / command line I run the SQL Loader.Control file:load datainfile 'import.csv'into table empfields terminated by "," optionally enclosed by '"'( empno, empname, sal, deptno )command:sqlldr user/password@SID control=loader_Control_File.ctlNext I connect to the database and run SQL query:select * from emp;and i see my data as usual, I can make Crystal Reports on it, etc etcI really don't understand why this can't be done with an XML fileOracle know the fields in the table EMPThe xml file has around every field the <EMPNO> and </EMPNO>Can't be easier than that I would say.I can understand Oracle likes some kind of description of the XML table, so reference to a XSD file would be understandable.But all examples are describing LOB things (whatever that is)Who can help me to get XML data in a normal table?Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...