Xml To Ms-access Datbase Conversion using JSP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mjahabarsadiq
    New Member
    • Feb 2007
    • 38

    Xml To Ms-access Datbase Conversion using JSP

    Hai friends

    I am doing one project titled 'XML MIGRATION'. The concept is to migrate the database files into xml files. It was done succesfully. But the only thing needed is to convert the xml file back to the database file.

    I am using JSP to develop this project. Both Oracle and Ms-Access databases can be migrated using this project.

    I need some coding examples for converting xml file into database (Ms-Access is enough).

    If anybody know the coding please forward it here..

    Thanks for your interest...

    By
    Sadiq
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by mjahabarsadiq
    Hai friends

    I am doing one project titled 'XML MIGRATION'. The concept is to migrate the database files into xml files. It was done succesfully. But the only thing needed is to convert the xml file back to the database file.

    I am using JSP to develop this project. Both Oracle and Ms-Access databases can be migrated using this project.

    I need some coding examples for converting xml file into database (Ms-Access is enough).

    If anybody know the coding please forward it here..

    Thanks for your interest...

    By
    Sadiq
    You may not be able to get someone to post all the code for you here.
    We prefer assisting where you do most of the coding.

    Do you know how to use the XML parsing API to parse an XML file? Using the parser will greatly simply the work for you here.

    Comment

    • mjahabarsadiq
      New Member
      • Feb 2007
      • 38

      #3
      Dear admin

      Thanks for your information..

      I dont know XML Parsing API. This is the first time that i am developing a big project usign java. So I need some sample codings for converting xml into database..

      Thanks...

      By
      Sadiq

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by mjahabarsadiq
        Dear admin

        Thanks for your information..

        I dont know XML Parsing API. This is the first time that i am developing a big project usign java. So I need some sample codings for converting xml into database..

        Thanks...

        By
        Sadiq

        Code:
         
        import org.w3c.dom.*;
        import org.xml.sax.*;
        import javax.xml.parsers.*;
        import java.io.*;
        public class DomTest1 {
         public static void main(String[] args) {
          try {
           String file = "test1.xml";
           DocumentBuilderFactory factory =   DocumentBuilderFactory.newInstance();
           DocumentBuilder builder = factory.newDocumentBuilder();
           Document document = builder.parse(new File(file));
           Element root = document.getDocumentElement();
           System.out.println(root.toString()); 
        ......
        That is the DOM approach and is easy to implement as you can see from the above code.

        Comment

        Working...