This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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.
I agree. Here's the link:
subject: Custom SAX Parser
It's not a secret anymore!