java.lang.IllegalArgumentException:没有实现指定模式语言的 SchemaFactory
我遇到以下异常:
java.lang.IllegalArgumentException:没有实现以下模式语言的 SchemaFactory:http://www.w3.org/2001/XMLSchema-instance 可以在 main 的 javax..xml.validation.SchemaFactory.newInstance(SchemaFactory.java:204) 上加载。SchemaImport3.validateXMLSchema(SchemaImport3.java:74) at MAIN.SchemaImport3.main(SchemaImport3.java:62)
这是我的代码:
URL source;
source = new URL(schemaList.getDocumentBaseURI());
SchemaFactory factory = SchemaFactory.newInstance(
XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);