Package de.zeigermann.xml.simpleImporter

SimpleImporter Simple and fast importer for XML configuration or import files.

See:
          Description

Interface Summary
SimpleImportHandler Callback interface for SimpleImporter.
 

Class Summary
ConversionHelpers Collection of some simple conversion and fallback methods for convenience.
DefaultSimpleImportHandler Empty implementation for callback interface SimpleImportHandler for SimpleImporter.
SimpleImporter Simple and fast importer for XML configuration or import files.
SimplePath Rudimentary representation of a path to an XML element.
 

Exception Summary
SimpleImporterException Tells us that there is something wrong with SimpleImporter.
 

Package de.zeigermann.xml.simpleImporter Description

SimpleImporter

Simple and fast importer for XML configuration or import files.
It is based on SAX and can be considered an extension to it. This means it is callback oriented and does not build an internal data structure like the DOM. While SAX is simple, fast, and memory friendly it might be a bit too rudimentary for most tasks. SimpleImporter adds more high level means for importing XML while preserving the SAX's benefits. These are the main extensions to the SAX:
  1. Every callback includes a full path to the XML element: In many cases this will make maintaining local stacks for keeping track of element histories obsolete.
  2. Leading character data can be included into start element callback: In many cases import files do not or only rarely contain mixed content. If so it is convenient to have the the full content of an element at hand with a single callback.
  3. More than one listener can be registered: Some XML files contain different types of data that may be interesting to different listeners. E.g. data to import from a server may contain error messages along with the real content data. It may be convenient to processes these blocks of data seperately.

Even though the DOM in combination with XPath can not to be beaten in the area of convenience, I consider it a good compromise between convenience, simplicity and speed.

SimpleImporter is meant as a replacement for non-XML oriented tools like digester from the apache pepole and similar ones. So, if you are satisfied with these tools, stick to them, forget about SimpleImporter. But if you are familiar with XML and prefer simple and explicite tools, try SimpleImporter.



Copyright 2002-2003 Oliver Zeigermann. All Rights Reserved.