public TestModelParser() { this.schemaFactory = SchemaFactory.newInstance(W3C_XML_SCHEMA); try { addSchema(TEST_NS, schemaFactory.newSchema(ReflectUtil.getResource(SCHEMA_LOCATION))); } catch (SAXException e) { throw new ModelValidationException("Unable to parse schema:" + ReflectUtil.getResource(SCHEMA_LOCATION), e); } }
public BpmnParser() { this.schemaFactory = SchemaFactory.newInstance(W3C_XML_SCHEMA); addSchema(BPMN20_NS, createSchema(BPMN_20_SCHEMA_LOCATION, typeof(BpmnParser).ClassLoader)); }