Skyhawk Systems - Simplify data transformations
Products | Download | Buy | About Us
 
Connect XML-2-DB User's Guide xml2dbStandalone.htmTable of ContentsdocForClasses.htm

8. Examples of using the Connect XML-2-DB library


This section provides a complete example of using the Connect XML-2-DB library. This makes it possible to integrate the functionality provided by Connect XML-2-DB with your own Java applications. In addition, to a java program that uses the Connect XML-2-DB library, this section includes some scripts to create the database tables, mapping files, sample XML data files and sample configuration files. To run this example modify the configuration file to point to your database system, run the scripts to create the database tables, modify the mapping file to point to your appropriate schema/database, compile the sample java program and then run it.

Oracle Example of using the Connect XML-2-DB library

For Oracle, refer to the following files in the examples directory:

  SampleXMLToDb_1.java   This is the sample java file that uses the Connect XML-2-DB library.
  O_compileAndRunSample1.bat   This is the batch file to compile and run the sample java program.

In addition refer to the files in examples\oracle_exs, which are listed in the section Oracle example for running Connect XML-2-DB tool as a standalone program.

Steps 1 through 4 are the same as for the section on Oracle example for running Connect XML-2-DB tool as a standalone program.

Step 5: Compile and run the sample java program - SampleXMLToDb_1.java
Edit the file O_compileAndRunSample1.bat. Substitute the correct value for MY_ROOT in this file. MY_ROOT should be the directory where you installed the Connect XML-2-DB software. This directory will have the JAR files provdied with Connect XML-2-DB.

Then run the batch file O_compileAndRunSample1.bat from the command prompt.


SQL Server Example of using the Connect XML-2-DB library

For SQL Server, refer to the following files in the examples directory:

  SampleXMLToDb_1.java   This is the sample java file that uses the Connect XML-2-DB library.
  S_compileAndRunSample1.bat   This is the batch file to compile and run the sample java program.

In addition refer to the files in examples\sqlserver_exs, which are listed in the section SQL Server example for running Connect XML-2-DB tool as a standalone program.

Steps 1 through 4 are the same as for the section on SQL Server example for running Connect XML-2-DB tool as a standalone program.

Step 5: Compile and run the sample java program - SampleXMLToDb_1.java
Edit the file S_compileAndRunSample1.bat. Substitute the correct value for MY_ROOT in this file. MY_ROOT should be the directory where you installed the Connect XML-2-DB software. This directory will have the JAR files provdied with Connect XML-2-DB.

Then run the batch file S_compileAndRunSample1.bat from the command prompt.

Copyright © Skyhawk Systems. All Rights Reserved.
Send comments and questions to support@skyhawksystems.com.
xml2dbStandalone.htmTable of ContentsdocForClasses.htm