@Override protected void validate(Document document) { try { SyndFeedInput input = new SyndFeedInput(); input.build(getDocument()); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (FeedException e) { if (e instanceof ParsingFeedException) { ParsingFeedException pfe = (ParsingFeedException) e; addError(Type.ERROR, pfe.getLineNumber(), pfe.getColumnNumber(), e.getMessage()); } else { addError(Type.ERROR, -1, -1, e.getMessage()); } } }
/** * {@inheritDoc} * * @see org.xwiki.validator.framework.AbstractXMLValidator#validate(org.w3c.dom.Document) */ @Override protected void validate(Document document) { try { SyndFeedInput input = new SyndFeedInput(); input.build(getDocument()); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (FeedException e) { if (e instanceof ParsingFeedException) { ParsingFeedException pfe = (ParsingFeedException) e; addError(Type.ERROR, pfe.getLineNumber(), pfe.getColumnNumber(), e.getMessage()); } else { addError(Type.ERROR, -1, -1, e.getMessage()); } } }