Java, XMLEvent location Characters

两盒软妹~` 提交于 2019-12-06 08:15:40
Dan Halbert

I encountered a similar problem when going from the latest jdk6 to the latest jdk7. There seems to be a bug in com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl. getCharacterOffset() returns incorrect value suggests using a different XML parser.

(moved from comment to answer)

EDIT: I did some more systematic testing on this, and have found cases in jdk6 that are wrong and in jdk7 that are right and also vice versa. Interestingly, the line number and line column values appear to be consistent and correct across both jdk's.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!