Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom SAX Parser

 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 www.onjava.com 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.
Thanks
Brian
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic