This document describes the SAX Loader Application
that demonstrates an efficient way of breaking a large files containing
multiple XML documents outside the database and then inserting them
as a set of separate documents.
Technical Overview
The SAX Loader application has been provided as both standalone application
and web based application. This application uses the SAX Parser to extract
XML document fragments from the source file provided and inserts them
into the table in the Oracle9i XML DB.
This application is provided in two versions,
stand-alone and web client. The stand-alone can be run with JDK as a
client-server application whereas the web client needs to be deployed
in OC4J(Oracle9iAS Containers for J2EE) and run as a web application.
The stand-alone application is written using
a set of Java classes. There is a main class (DocumentReader
class) and a set of support classes that provide for the tracing of
the log information into a file and onto the system console. The DocumentWriter
class implements the thread model and enables multithreading to be used.
The database connection parameters are provided through an XML file,
SAXLoader.xml. This application provides support for connecting
to the database through both OCI and thin JDBC drivers. The location
of the file that contains the XML documents to be loaded into the Oracle9i
XML DB is also specified in this SAXLoader.xml file. The
application also provides provision for tracing the application's execution
log into the system console or the same into a log file.
In the web based application the users interact with the application
using the standard JSP-based interface with the help of a browser. All
the JSPs are hosted on OC4J. This web application uses the same classes
that are used by the stand-alone version of the application. The inputs
provided through the JSP is passed on the DocumentReader
class method which with the help of other classes performs the required
operations on the input file. JDBC call mechanism is used by the Java
classes to insert the XML documents into the database.
The following figure depicts the flow of this SAX
Loader application:
SAX Loader application has been provided both as
a standalone application and web based application.
Running the Standalone
Application
Please go through the stand-alone
install file to set up and run the standalone application.
Running the Web based Application
Please go through the web
client install file to set up and run the web based application.