
Running this program against the price list in Listing 8.1 gives the result:
The cheapest offer is XMLi ($699.0)
Note that the classpath points to the parser and to the classes directory.
The fully qualified name of the file is com.psol.xbe.Cheapest.
CAUTION
This example won’t work unless you have installed a Java Development Kit.
If there is an error message similar to
“Exception in thread “main”
java.lang.NoClassDefFoundError”, it means that either the classpath is incorrect
(be sure it points to the right directories) or that you typed an incorrect class name
(com.psol.xbe.Cheapest).
SAX Interfaces and Objects
Events in SAX are defined as methods ...