• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • 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
 
Sheriff
Posts: 27235
87
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
Sheriff
Posts: 27235
87
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.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic