DefaultHandler vs ContentHandler
Added by Anonymous about 15 years ago
Legacy ID: #7518021 Legacy Poster: Imran J (jimranjava)
Hi Folks, * What is the difference between DefaultHandler and ContentHandler in java Saxon...? * Please provide me example and usage of the above specified classes * Thanks in advance for valuable help Regards, JavaImran
Replies (2)
RE: DefaultHandler vs ContentHandler
-
Added by Anonymous about 15 years ago
Legacy ID: #7518181 Legacy Poster: Michael Kay (mhkay)
DefaultHandler and ContentHandler belong to the SAX package - they are nothing to do with Saxon, except that Saxon uses them. ContentHandler is an interface that works with a SAX parser to receive notification of parsing events. DefaultHandler is a class that implements the ContentHandler interface - it's provided for convenience so that by writing a class that extends DefaultHandler, you create an implementation of ContentHandler that provides a default "do nothing" implementation of all the parser callback methods. Most good general-purpose books on XML (especially XML with Java) will include a chapter on SAX programming. I would recommend the one by Elliotte Rusty Harold, which devotes almost 50 pages to the subject.
RE: DefaultHandler vs ContentHandler
-
Added by Anonymous about 15 years ago
Legacy ID: #7518348 Legacy Poster: Imran J (jimranjava)
Thanks for your quick reply.........
Please register to reply