*/
public static void validate(String xml, Schema schema, boolean nameSpaceAware) throws JuException {
try {
schema.newValidator().validate(new DOMSource(XmlUtils.loadXml(xml, null, nameSpaceAware)));
} catch (SAXParseException ex) {
throw new JuException("Parse exception: " + ex.getMessage(), ex);
} catch (Exception ex) {
throw new JuException("Validation failed", ex);
}
}