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.
Item Represntation of a path element.
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 Description


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 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 separately.

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.

Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.