wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Custom SAX Parser" Watch "Custom SAX Parser" New topic
Author

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 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom SAX Parser
 
Similar Threads
reading xml data
We need a good java client library rather than server.
transforming non XML data with TransformerHandler
How to do xml parsing using SAX parser
Sample test question