PHP中文网2017-04-17 17:14:56
Is ContentHandler your custom class? If so, see if your custom class has an empty constructor. The error message should already be obvious.
ringa_lee2017-04-17 17:14:56
XMLReader.setContentHandler(new DefaultHandler() {...}) requires DefaultHandler as a processing parameter. The ContentHandler in the original code must be inherited from DefaultHandler. You did not copy the ContentHandler code