使用标准的JDK 6:
System.setProperty(DOMImplementationRegistry.PROPERTY, "com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl");DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); com.sun.org.apache.xerces.internal.impl.xs.XSImplementationImpl impl = (XSImplementationImpl) registry.getDOMImplementation("XS-Loader");XSLoader schemaLoader = impl.createXSLoader(null);XSModel model = schemaLoader.loadURI("src/test/resources/my.xsd");
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)