Developing gXML Applications

All gXML processors, including custom processing, run within a GxProcessingContext instance that provides necessary metadata. A GxProcessingContext instance in turn is created through a GxApplication instance.

You must write a class that provides an instance of GxApplication. The best way to do this is to write an abstract class that implements all but the newProcessingContext method of GxApplication. This approach allows you to write your application generically and then inject the choice of parameterization as late as possible for maximum code reuse and flexibility.

This, of course, is not the only way to use gXML. An existing architecture may force the choice of parameterization and create silos of XML processing. The degree of integration in this case may be less that is possible with a homogeneous solution.

Whatever the approach, the best way to use gXML is to write generic, parameterized, and XML processing code whenever possible.