O'Reilly logo

Building Parsers with Java™ by Steven John Metsker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required