/** * @see org.apache.xerces.xni.parser.XMLParserConfiguration#setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler) */ @Override public void setErrorHandler(XMLErrorHandler errorHandler) { config.setErrorHandler(errorHandler); }
/** * Allow an application to register an error event handler. * * <p>If the application does not register an error handler, all * error events reported by the SAX parser will be silently * ignored; however, normal processing may not continue. It is * highly recommended that all SAX applications implement an * error handler to avoid unexpected bugs.</p> * * <p>Applications may register a new or different handler in the * middle of a parse, and the SAX parser must begin using the new * handler immediately.</p> * * @param errorHandler The error handler. * @exception java.lang.NullPointerException If the handler * argument is null. * @see #getErrorHandler */ public void setErrorHandler(ErrorHandler errorHandler) { fParserConfiguration.setErrorHandler(new ErrorHandlerWrapper(errorHandler)); } // setErrorHandler(ErrorHandler)
/** * Allow an application to register an error event handler. * <p> * <p> * If the application does not register an error handler, all error events reported by the SAX * parser will be silently ignored; however, normal processing may not continue. It is highly * recommended that all SAX applications implement an error handler to avoid unexpected bugs. * </p> * <p> * <p> * Applications may register a new or different handler in the middle of a parse, and the SAX * parser must begin using the new handler immediately. * </p> * * @param errorHandler The error handler. * @throws java.lang.NullPointerException If the handler argument is null. * @see #getErrorHandler */ public void setErrorHandler(ErrorHandler errorHandler) { fParserConfiguration.setErrorHandler(new ErrorHandlerWrapper(errorHandler)); } // setErrorHandler(ErrorHandler)
/** * Allow an application to register an error event handler. * * <p>If the application does not register an error handler, all * error events reported by the SAX parser will be silently * ignored; however, normal processing may not continue. It is * highly recommended that all SAX applications implement an * error handler to avoid unexpected bugs.</p> * * <p>Applications may register a new or different handler in the * middle of a parse, and the SAX parser must begin using the new * handler immediately.</p> * * @param errorHandler The error handler. * @exception java.lang.NullPointerException If the handler * argument is null. * @see #getErrorHandler */ public void setErrorHandler(ErrorHandler errorHandler) { fParserConfiguration.setErrorHandler(new ErrorHandlerWrapper(errorHandler)); }
/** * Allow an application to register an error event handler. * * <p>If the application does not register an error handler, all * error events reported by the SAX parser will be silently * ignored; however, normal processing may not continue. It is * highly recommended that all SAX applications implement an * error handler to avoid unexpected bugs.</p> * * <p>Applications may register a new or different handler in the * middle of a parse, and the SAX parser must begin using the new * handler immediately.</p> * * @param errorHandler The error handler. * @exception java.lang.NullPointerException If the handler * argument is null. * @see #getErrorHandler */ public void setErrorHandler(ErrorHandler errorHandler) { fParserConfiguration.setErrorHandler(new ErrorHandlerWrapper(errorHandler)); } // setErrorHandler(ErrorHandler)
/** * Allow an application to register an error event handler. * <p> * <p> * If the application does not register an error handler, all error events reported by the SAX * parser will be silently ignored; however, normal processing may not continue. It is highly * recommended that all SAX applications implement an error handler to avoid unexpected bugs. * </p> * <p> * <p> * Applications may register a new or different handler in the middle of a parse, and the SAX * parser must begin using the new handler immediately. * </p> * * @param errorHandler The error handler. * @throws java.lang.NullPointerException If the handler argument is null. * @see #getErrorHandler */ public void setErrorHandler(ErrorHandler errorHandler) { fParserConfiguration.setErrorHandler(new ErrorHandlerWrapper(errorHandler)); } // setErrorHandler(ErrorHandler)
/** * Instantiates a new dtd to xsd parser. * * @param configuration * the configuration */ public Parser(final XMLParserConfiguration configuration) { super(configuration); configuration.setErrorHandler(this); this.dataTypeMap = new HashMap<>(); this.dataTypeMap.put(DTD_ID, XSD_ID); this.dataTypeMap.put(DTD_IDREF, XSD_IDREF); this.dataTypeMap.put(DTD_CDATA, XSD_STRING); this.dataTypeMap.put(DTD_IDREFS, XSD_IDREFS); this.dataTypeMap.put(DTD_ENTITY, XSD_ENTITY); this.dataTypeMap.put(DTD_ENTITIES, XSD_ENTITIES); this.dataTypeMap.put(DTD_NMTOKEN, XSD_NMTOKEN); this.dataTypeMap.put(DTD_NMTOKENS, XSD_NMTOKENS); this.dataTypeMap.put(DTD_NOTATION, XSD_NOTATION); this.allElements = new HashMap<>(); this.setXmlResourceIdentifier = new HashSet<>(); this.listGroupTypes = new ArrayList<>(); this.listGroupElements = new ArrayList<>(); this.listXsdTypePattern = new ArrayList<>(); this.parsedStack = new Stack<>(); this.stackElements = new Stack<>(); }
parserConfig.setErrorHandler( new XMLErrorHandler() { @SuppressWarnings("synthetic-access") @Override
final boolean reportErrors = listener != null; if (reportErrors) { fConfiguration.setErrorHandler(new HTMLErrorHandler(listener, url, htmlContent));
final boolean reportErrors = listener != null; if (reportErrors) { fConfiguration.setErrorHandler(new HTMLErrorHandler(listener, url, htmlContent));
if (listener != null) { reportErrors = true; fConfiguration.setErrorHandler(new HTMLErrorHandler(listener, url));
if (listener != null) { reportErrors = true; fConfiguration.setErrorHandler(new HTMLErrorHandler(listener, url));
if (listener != null) { reportErrors = true; fConfiguration.setErrorHandler(new HTMLErrorHandler(listener, url));