我在尝试在Java 8中设置'isSupportingExternalEntities'的属性时遇到SAXNotRecognizedException,>
final SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); sf.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
Exception:
org.xml.sax.SAXNotRecognizedException:无法识别属性'javax.xml.stream.isSupportingExternalEntities'。
[我在尝试在Java 8最终SchemaFactory sf = SchemaFactory.newInstance(XMLConstants ....]中设置'isSupportingExternalEntities'的属性时遇到了SAXNotRecognizedException,
SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
Schema schema = factory.newSchema(Source);