Sax Loader example
The following sample code shows a technique that can be used to maximize throughput when uploading a large XML File. The technique relies on breaking the large document into a series of fragments and inserting each of the fragments as a seperate XML document.
This technique is appropriate when the XML file consists of a collection of set of documents that have been combined into a single large document. Since the processing of parsing and creating the smaller documents in typically less expensive the task of inserting the smaller documents into the database it allows a single reader process to feed multiple writer processes. The number of writer processes can be tuned to maximize resource consumption and throughput..
The source code for the classes can be found below..