[jdom-interest] Converting elements from a SAX stream to JDOM elements

Michael Kay mike at saxonica.com
Mon Jul 20 02:06:13 PDT 2009

> Unfortunately, this didn't work. I've never implemented a 
> dynamic proxy in Java before, and it seems that they can only 
> implement interfaces, not classes. Since DefaultHandler is a 
> class, Java refused to typecast my proxy.

DefaultHandler is a helper class that implements ContentHandler. Your proxy
class should either *implement* the interface ContentHandler, or *extend*
the class DefaultHandler.


Michael Kay

More information about the jdom-interest mailing list