Class XMLDocumentValidator

java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
eu.europa.esig.dss.xades.validation.XMLDocumentValidator
All Implemented Interfaces:
DocumentValidator, ProcessExecutorProvider<DocumentProcessExecutor>

public class XMLDocumentValidator extends SignedDocumentValidator
Validator of XML Signed document

In order to perform validation-process, please ensure the `dss-validation` module is loaded within the dependencies list of your project.

  • Constructor Details

    • XMLDocumentValidator

      public XMLDocumentValidator(DSSDocument dssDocument)
      The default constructor for XMLDocumentValidator. The created instance is initialised with default XAdESPaths .
      Parameters:
      dssDocument - The instance of DSSDocument to validate
  • Method Details

    • getDocumentAnalyzer

      public XMLDocumentAnalyzer getDocumentAnalyzer()
      Description copied from class: SignedDocumentValidator
      Returns the current instance of DocumentAnalyzer
      Overrides:
      getDocumentAnalyzer in class SignedDocumentValidator
      Returns:
      DocumentAnalyzer
    • setDisableXSWProtection

      public void setDisableXSWProtection(boolean disableXSWProtection)
      NOT RECOMMENDED : This parameter allows disabling protection against XML Signature wrapping attacks (XSW). It disables the research by XPath expression for defined Type attributes.
      Parameters:
      disableXSWProtection - true to disable the protection
    • getXAdESPathsHolder

      public List<XAdESPath> getXAdESPathsHolder()
      This getter returns the XAdESPaths
      Returns:
      a list of XAdESPath
    • addXAdESPathsHolder

      public void addXAdESPathsHolder(XAdESPath xadesPathsHolder)
      This adds a XAdESPaths. This is useful when the signature follows a particular schema.
      Parameters:
      xadesPathsHolder - XAdESPath
    • clearQueryHolders

      public void clearQueryHolders()
      Removes all elements from the list of query holders. The list will be empty after this call returns.
    • getRootElement

      public Document getRootElement()
      Returns the root element of the validating document
      Returns:
      Document