@Test public void validateGetFeature() { AppSchemaValidator.validate("<wfs:GetFeature " + "xmlns:wfs=\"http: + "xmlns:xsi=\"http: + "xsi:schemaLocation=\"" + "http: + "\"><wfs:Query typeName=\"test\"/></wfs:GetFeature>"); }
public static void validate(String xml) { byte[] bytes = null; String encoding = getEncoding(xml); if (encoding != null) { try { bytes = xml.getBytes(encoding); } catch (UnsupportedEncodingException e) { } } if (bytes == null) { bytes = xml.getBytes(); } InputStream input = null; try { input = new ByteArrayInputStream(bytes); validate(input); } finally { if (input != null) { try { input.close(); } catch (IOException e) { } } } }
AppSchemaValidator { public static void validate(String xml) { byte[] bytes = null; String encoding = getEncoding(xml); if (encoding != null) { try { bytes = xml.getBytes(encoding); } catch (UnsupportedEncodingException e) { } } if (bytes == null) { bytes = xml.getBytes(); } InputStream input = null; try { input = new ByteArrayInputStream(bytes); validate(input); } finally { if (input != null) { try { input.close(); } catch (IOException e) { } } } } }
AppSchemaValidator { public static void validate(String xml) { byte[] bytes = null; String encoding = getEncoding(xml); if (encoding != null) { try { bytes = xml.getBytes(encoding); } catch (UnsupportedEncodingException e) { } } if (bytes == null) { bytes = xml.getBytes(); } InputStream input = null; try { input = new ByteArrayInputStream(bytes); validate(input); } finally { if (input != null) { try { input.close(); } catch (IOException e) { } } } } private  AppSchemaValidator(); private  AppSchemaValidator(AppSchemaResolver resolver); }
AppSchemaValidator { public static void validate(String xml) { byte[] bytes = null; String encoding = getEncoding(xml); if (encoding != null) { try { bytes = xml.getBytes(encoding); } catch (UnsupportedEncodingException e) { } } if (bytes == null) { bytes = xml.getBytes(); } InputStream input = null; try { input = new ByteArrayInputStream(bytes); validate(input); } finally { if (input != null) { try { input.close(); } catch (IOException e) { } } } } private  AppSchemaValidator(); private  AppSchemaValidator(AppSchemaResolver resolver); List<String> getFailures(); boolean isFailOnWarning(); void setFailOnWarning(boolean failOnWarning); void parse(InputStream input); void checkForFailures(); static AppSchemaValidator buildValidator(); static AppSchemaValidator buildValidator(AppSchemaResolver resolver); static void validateResource(String name); static void validate(String xml); static void validate(InputStream input); }
AppSchemaValidator { public static void validate(String xml) { byte[] bytes = null; String encoding = getEncoding(xml); if (encoding != null) { try { bytes = xml.getBytes(encoding); } catch (UnsupportedEncodingException e) { } } if (bytes == null) { bytes = xml.getBytes(); } InputStream input = null; try { input = new ByteArrayInputStream(bytes); validate(input); } finally { if (input != null) { try { input.close(); } catch (IOException e) { } } } } private  AppSchemaValidator(); private  AppSchemaValidator(AppSchemaResolver resolver); List<String> getFailures(); boolean isFailOnWarning(); void setFailOnWarning(boolean failOnWarning); void parse(InputStream input); void checkForFailures(); static AppSchemaValidator buildValidator(); static AppSchemaValidator buildValidator(AppSchemaResolver resolver); static void validateResource(String name); static void validate(String xml); static void validate(InputStream input);  }