void (StdXMLReader r, @NotNull IXMLBuilder builder, @Nullable IXMLValidator validator) { StdXMLParser parser = new StdXMLParser(); parser.setReader(r); parser.setBuilder(builder); parser.setValidator(validator == null ? new EmptyValidator() : validator); parser.setResolver(new EmptyEntityResolver()); try { parser.parse(); } catch (ParserStoppedXmlException ignore) { } catch (XMLException e) { if (e.getException() instanceof ProcessCanceledException) { throw new ProcessCanceledException(e); } LOG.debug(e); } }