Class XPathFactoryConfigurer.Builder

  • Enclosing class:
    XPathFactoryConfigurer

    public static class XPathFactoryConfigurer.Builder
    extends Object
    Builder for a XPathFactoryConfigurer.
    Since:
    XMLUnit 2.10.0
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • withSafeProperty

        public XPathFactoryConfigurer.Builder withSafeProperty​(String key,
                                                               String value)
        Configures the factory with the given property if it is supported.

        This method will not do anything if XPathFactory doesn't support the setPropery method which has been added with Java 18.

        Parameters:
        key - key of the property to be set
        value - value for the property to set
        Returns:
        this
      • withSafeFeature

        public XPathFactoryConfigurer.Builder withSafeFeature​(String key,
                                                              boolean value)
        Configures the factory with the given feature if it is supported.
        Parameters:
        key - key of the feature to be set
        value - value for the feature to set
        Returns:
        this
      • withExtensionFunctionsDisabled

        public XPathFactoryConfigurer.Builder withExtensionFunctionsDisabled()
        Configures the factory to not enable extension functions.
        Returns:
        this
      • withSecureProcessingEnabled

        public XPathFactoryConfigurer.Builder withSecureProcessingEnabled()
        Configures the factory to enable secure processing which disables all external access as well as execution of extension functions.
        Returns:
        this