5.9. Helpers

The helpers that build a Coffee object are similar to their assembler counterparts. The Helper class is the top of a hierarchy of classes that help to build an object based on recognizing elements of an XML markup file. An application (such as ShowCoffeeXML) that uses a SAX parser can pass control to helpers upon receiving SAX events. The idea is that the application will register itself with the SAX parser to receive recognition events. Then the application uses Helper objects to help build a target object.

 package sjm.examples.coffee; /** * This class is the top of a hierarchy of classes that help * to build a coffee object, based on recognizing elements * of an XML markup file.... */ public class Helper { /** * An application ...

Get Building Parsers with Java™ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.