This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JDBC and the fly likes Reverse engineers database into xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Reverse engineers database into xml" Watch "Reverse engineers database into xml" New topic
Author

Reverse engineers database into xml

Vishwanath GNV
Greenhorn

Joined: Sep 05, 2006
Posts: 6
Hi All,

I need to generate xml file from oracle database. I am looking for open source tool or something like code. So, that I would get some idea, based on them...

Please tell me, how handle this...ASAP
Vishal Matere
Ranch Hand

Joined: Jan 22, 2008
Posts: 81
XML file generation http://rustemsoft.com/jsps.htm
Does this Help?


SCJP <br />SCWCD <br />SCBCD <br />SCEA-1
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3710
    
    5

It's a non-trivial topic, meaning you have to write a parser yourself. You can get tools that will try to auto-generate a database out of XML, but often the logical structure is lost. For example, you might use database normalization for efficient storage of column data, but in the XML you want these tables denormalized so that a record contains all of its information.

In short, there's no magic solution since database don't necessarily have relationships easily discovered by a general purpose parser. Besides, writing a program that reads a database and outputs XML is good practice and this way you'll have 100% control over how the data is structured in the XML for easy customization.
[ April 22, 2008: Message edited by: Scott Selikoff ]

My Blog: Down Home Country Coding with Scott Selikoff
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

One easy way is to use DBUnit through an ANT script. I'm not recommending it, just saying it is possible ( since DB Unit stores its info as XML)
 
GeeCON Prague 2014
 
subject: Reverse engineers database into xml