@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);
}
}
});
}
StaxXmlParser.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:scaleDOM
作者:
评论列表
文章目录