admin管理员组

文章数量:1650767

javax.xml.XMLConstants;

 

DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
......       
documentBuilderFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);

使用javax.xml.XMLConstants包中的XMLConstants.FEATURE_SECURE_PROCESSING时,编译器会提示XMLConstants中没有FEATURE_SECURE_PROCESSING这个属性,但是明明是有的。

 

解决方案:右键项目名称——>build path——>点击选项卡:将JRE系统库 移至顶部并应用即可。

具体原理我也没弄清楚,但是这个的确可解决问题,我已经在这栽2次跟头了,这回记录下来。

本文标签: 错误XMLConstantsFEATURESECUREPROCESSING