File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Custom SAX Parser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Custom SAX Parser" Watch "Custom SAX Parser" New topic

Custom SAX Parser

Brian Nice
Ranch Hand

Joined: Nov 02, 2000
Posts: 195
I'm going through the Java and XSLT book by O'Reilly and had a question on their custom SAX Parser that they wrote in chapter 5 to read CSV data. This chapter is on the web at site if you want to read it.
They have a program which reads the CSV data and fires the SAX events like startElement, endElement, etc..., but the part I am missing is how those events are handled. I thought that you had to write a ContentHandler that provided implementations to those methods. They provide a ContentHandler through the TransformerHandler, but no implementation for the events.
How then,is the output being written if there is no implementation for the events being fired? Is there some sort of default implementation, or since this is going to an XSLT processor, is that somehow handling the events?
If someone could straighten up the confusion on this for me I would appreciate it.
Don't get me started about those stupid light bulbs.
subject: Custom SAX Parser
It's not a secret anymore!