Exception in thread “main” javax.xml.stream.XMLStreamException: ParseError at [row,col]:[86,11]

问题:

通过使用Stax解析xml文件时,出现以下错误消息:

Exception in thread "main" javax.xml.stream.XMLStreamException: ParseError at [row,col]:[86,11]
Message: Open quote is expected for attribute "{1}" associated with an element type "type_id".
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next
(XMLStreamReaderImpl.java:594)
at com.sun.xml.internal.stream.XMLEventReaderImpl.nextEvent
(XMLEventReaderImpl.java:85)
at Main.main(Main.java:49) 

删除以下DOCTYPE行后,问题不再存在:

<!DOCTYPE bugzilla SYSTEM“ https://bugs.eclipse.org/bugs/bugzilla.dtd”>

解:

inputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);

这会将属性设置为请求不支持DTD的处理器。

Exception in thread “main” javax.xml.stream.XMLStreamException: ParseError at [row,col]:[86,11]_第1张图片

你可能感兴趣的:(java,maven,xml,mybatis,tomcat)