• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help needed to convert ms access mdb files to xml files

 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a directory structure containing MS Access (mdb files) .I need to convert each mdb file to corresponding xml,xsd files.

Can someone help me with the java api/documentation that I could use to perform this task?

Would really be thankful if someone could post some sample code for the conversion.

Thanks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since you dont say what the resulting XML is to be used for I will have to take a guess.

Your first step will be to define what you want the XML to look like.

I suggest using a text editor to create an example XML document using reasonable data.

Bill
 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response!

The Xml will contain the data that is inside the mdb database files.I need to read the mdb files and the data inside it using Java api which I am not sure which one to use and create corresponding xml files for each mdb file.

I want to convert this(from mdb to xml) as it is the required format for our supporting application.

The format of the xml file is something similar to the one seen below:


Regards

Moieen
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just create a FileWriter (with encoding ISO-8859-1) and write the XML document to it.
 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any Java class/api to read the data from the files with .mdb extensions?(MS-Access files)

Regards

Moieen
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So apparently you just want to turn a table into a XML document, not combine data from multiple tables.

You might be able to use the ServingXML toolkit - an open source project.

As I recall, the download includes SQL database to XML tools.

Bill
 
Paul Clapham
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Moieen Khatri wrote:Is there any Java class/api to read the data from the files with .mdb extensions?(MS-Access files)



That's JDBC.
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic