StaxXmlParser.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:scaleDOM 作者:
@Override
public void setErrorHandler(final ErrorHandler eh) {
    checkNotNull(eh, "Argument eh must not be null.");

    inputFactory.setXMLReporter(new XMLReporter() {
        @Override
        public void report(final String message, final String errorType, final Object relatedInformation,
                final Location location) throws XMLStreamException {
            try {
                eh.error(new SAXParseException(message, location.getPublicId(), location.getSystemId(), location
                        .getLineNumber(), location.getColumnNumber()));
            } catch (final SAXException ex) {
                throw new XMLStreamException(ex);
            }
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号