Class XPathFactoryConfigurer

java.lang.Object
org.xmlunit.util.XPathFactoryConfigurer

public class XPathFactoryConfigurer extends Object
Configures XpathFactories.
Since:
XMLUnit 2.10.0
  • Field Details

    • Default

      public static final XPathFactoryConfigurer Default
      The default instance which disables extension functions.

      In order to disable extension functions XPathFactory#setProperty needs to exists which requires Java18 or newer. SecureProcessing should be available on any JDK.

    • SecureProcessing

      public static final XPathFactoryConfigurer SecureProcessing
      The instance which enables secure processing thus disables execution of extension functions.
  • Method Details

    • configure

      public XPathFactory configure(XPathFactory factory)
      Applies the current configuration.
      Parameters:
      factory - the factory to configure
      Returns:
      the configured factory
      Throws:
      ConfigurationException - if any of the propertys or features set is not supported.
    • builder

      public static XPathFactoryConfigurer.Builder builder()
      Creates a builder for XPathFactoryConfigurers.
      Returns:
      a fresh builder