Java Sun/Oracle xerces解析器错误?

Java Sun/Oracle xerces解析器错误?,java,eclipse,oracle,unicode,xerces,Java,Eclipse,Oracle,Unicode,Xerces,我正在使用EclipseLuna的JDK1.8rt.jar中的com.sun.org.apache.xerces解析器。解析包含相同字符串(由汉字组成)的属性和CDATA部分的XML文档,如下所示: <tns:metaData tns:name="I guess the answer is "yes, it is a bug in the Sun/Oracle version of xerces." I just tried this with the latest build from

我正在使用EclipseLuna的JDK1.8rt.jar中的com.sun.org.apache.xerces解析器。解析包含相同字符串(由汉字组成)的属性和CDATA部分的XML文档,如下所示:

<tns:metaData tns:name="I guess the answer is "yes, it is a bug in the Sun/Oracle version of xerces." I just tried this with the latest build from apache and it works!

Note, if you're going to use the command line -Djava.endorsed.dirs="..." switch, you'll need to add both xerces and xalan binaries because it is required by eclipse. For windoze it's something like:

 -Djava.endorsed.dirs="C:\Program Files (x86)\Java\xerces-2_11_0"
 -Djava.endorsed.dirs="C:\Program Files (x86)\Java\xalan-j_2_7_2"
我想答案是“是的,这是Sun/Oracle版本xerces中的一个bug。”我刚刚用apache的最新版本尝试了这个,它很管用

注意,如果要使用命令行-Djava.annowned.dirs=“…”开关,则需要同时添加xerces和xalan二进制文件,因为eclipse需要它。对于温多泽来说,这就像:

干杯, 鲍勃