Mustard on a SAX-wich: Filter-Feeding a ContentHandler

Now that you can feed a hungry ContentHandler, as we did in the last section, you can let another part of the program call the SAX-wich methods, and then you can just add the mustard to it (or remove the mayonnaise). I'm not totally being facetious here, because there really is a kind of preprocessing that you can do to the XML data as it is being passed to a ContentHandler. In the previous section, you fired SAX events into a ContentHandler class directly, without using a parser. That may be useful in some applications, but a more common scenario involves reading data from an ...

Get Wicked Cool Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.