Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 protected internal override void configureFactory(DocumentBuilderFactory dbf)
 {
     dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
     dbf.setAttribute(JAXP_SCHEMA_SOURCE, ReflectUtil.getResource(SCHEMA_LOCATION).ToString());
     base.configureFactory(dbf);
 }