Package org.xmlunit.util
Class XPathFactoryConfigurer.Builder
java.lang.Object
org.xmlunit.util.XPathFactoryConfigurer.Builder
- Enclosing class:
- XPathFactoryConfigurer
Builder for a XPathFactoryConfigurer.
- Since:
- XMLUnit 2.10.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a XPathFactoryConfigurer.Configures the factory to not enable extension functions.withFeature
(String key, boolean value) Configures the factory with the given feature, causes an exception inXPathFactoryConfigurer.configure(javax.xml.xpath.XPathFactory)
if the feature is not supported.withProperty
(String key, String value) Configures the factory with the given property, causes an exception inXPathFactoryConfigurer.configure(javax.xml.xpath.XPathFactory)
if the property is not supported.withSafeFeature
(String key, boolean value) Configures the factory with the given feature if it is supported.withSafeProperty
(String key, String value) Configures the factory with the given property if it is supported.Configures the factory to enable secure processing which disables all external access as well as execution of extension functions.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Builds a XPathFactoryConfigurer.- Returns:
- the configurer
-
withProperty
Configures the factory with the given property, causes an exception inXPathFactoryConfigurer.configure(javax.xml.xpath.XPathFactory)
if the property is not 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 setvalue
- value for the property to set- Returns:
- this
-
withSafeProperty
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 setvalue
- value for the property to set- Returns:
- this
-
withFeature
Configures the factory with the given feature, causes an exception inXPathFactoryConfigurer.configure(javax.xml.xpath.XPathFactory)
if the feature is not supported.- Parameters:
key
- key of the feature to be setvalue
- value for the feature to set- Returns:
- this
-
withSafeFeature
Configures the factory with the given feature if it is supported.- Parameters:
key
- key of the feature to be setvalue
- value for the feature to set- Returns:
- this
-
withExtensionFunctionsDisabled
Configures the factory to not enable extension functions.- Returns:
- this
-
withSecureProcessingEnabled
Configures the factory to enable secure processing which disables all external access as well as execution of extension functions.- Returns:
- this
-