Interface DocumentValidator

All Known Implementing Classes:
SCHValidator, XSDValidator, XSLTValidator

public interface DocumentValidator
Interface for document validator implementation classes.
Author:
Ionite
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Reload the underlying validation file
    validate(byte[] source)
    Validate the given XML source against the validation file and return a new ValidationResult instance
    validate(byte[] source, ValidationResult result)
    Validate the given XML source against the validation file, and add the errors and warnings to the given ValidationResult item.
  • Method Details

    • reload

      void reload() throws ValidatorException
      Reload the underlying validation file
      Throws:
      ValidatorException
    • validate

      ValidationResult validate(byte[] source) throws ValidatorException
      Validate the given XML source against the validation file and return a new ValidationResult instance
      Parameters:
      source - The XML source to validate
      Returns:
      A newly initialized ValidationResult containing the results of the validation
      Throws:
      ValidatorException - Thrown when there is an error performing the validation
    • validate

      ValidationResult validate(byte[] source, ValidationResult result) throws ValidatorException
      Validate the given XML source against the validation file, and add the errors and warnings to the given ValidationResult item.
      Parameters:
      source - The XML source to validate
      result - Errors and warnings are added to this instance in-place
      Returns:
      The modified ValidationResult instance
      Throws:
      ValidatorException - Thrown when there is an error performing the validation