欢迎选择我的课程,让我们一起见证您的进步~~
Is ContentHandler your custom class? If so, see if your custom class has an empty constructor. The error message should already be obvious.
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
Is ContentHandler your custom class? If so, see if your custom class has an empty constructor. The error message should already be obvious.
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