core/src/main/java/com/opentext/ia/sdk/support/xml/XmlUtil.java
public static void validate(InputStream xml, InputStream xmlSchema, String humanFriendlyDocumentType)
      throws IOException {
    try {
      newXmlSchemaValidator(xmlSchema).validate(new StreamSource(Objects.requireNonNull(xml)));
    } catch (SAXException e) {
      throw new ValidationException("Invalid " + humanFriendlyDocumentType, e);
    }
  }
public static void validate(InputStream xml, InputStream xmlSchema, String humanFriendlyDocumentType)
      throws IOException {
    try {
      newXmlSchemaValidator(xmlSchema).validate(new StreamSource(Objects.requireNonNull(xml)));
    } catch (SAXException e) {
      throw new ValidationException("Invalid " + humanFriendlyDocumentType, e);
    }
  }
Validate an XML document against an XML Schema document.
@param xml The XML document to validate
@param xmlSchema The XML Schema document to validate against
@param humanFriendlyDocumentType A human-friendly name that describes the schema
@throws IOException When an I/O error occurs