Package org.xmlunit.util
Class DocumentBuilderFactoryConfigurer.Builder
java.lang.Object
org.xmlunit.util.DocumentBuilderFactoryConfigurer.Builder
- Enclosing class:
- DocumentBuilderFactoryConfigurer
Builder for a DocumentBuilderFactoryConfigurer.
- Since:
- XMLUnit 2.6.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a DocumentBuilderFactoryConfigurer.withAttribute
(String key, Object value) Configures the factory with the given attribute, causes an exception inDocumentBuilderFactoryConfigurer.configure(javax.xml.parsers.DocumentBuilderFactory)
if the attribute is not supported.Configures the factory to not load any external DTDs.Configures the factory to not parse any DTDs.withExpandEntityReferences
(boolean b) Configure whether the factory's expands entity references.withFeature
(String key, boolean value) Configures the factory with the given feature, causes an exception inDocumentBuilderFactoryConfigurer.configure(javax.xml.parsers.DocumentBuilderFactory)
if the feature is not supported.withSafeAttribute
(String key, Object value) Configures the factory with the given attribute if it is supported.withSafeFeature
(String key, boolean value) Configures the factory with the given feature if it is supported.withXIncludeAware
(boolean b) Configure the factory's XInclude awareness.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Builds a DocumentBuilderFactoryConfigurer.- Returns:
- the built configurer
-
withAttribute
Configures the factory with the given attribute, causes an exception inDocumentBuilderFactoryConfigurer.configure(javax.xml.parsers.DocumentBuilderFactory)
if the attribute is not supported.- Parameters:
key
- key of the attributevalue
- value for the attribute- Returns:
- this
-
withSafeAttribute
Configures the factory with the given attribute if it is supported.- Parameters:
key
- key of the attributevalue
- value for the attribute- Returns:
- this
-
withFeature
Configures the factory with the given feature, causes an exception inDocumentBuilderFactoryConfigurer.configure(javax.xml.parsers.DocumentBuilderFactory)
if the feature is not supported.- Parameters:
key
- key of the featurevalue
- value for the feature- Returns:
- this
-
withSafeFeature
Configures the factory with the given feature if it is supported.- Parameters:
key
- key of the featurevalue
- value for the feature- Returns:
- this
-
withDTDLoadingDisabled
Configures the factory to not load any external DTDs.- Returns:
- this
-
withDTDParsingDisabled
Configures the factory to not parse any DTDs.- Returns:
- this
-
withXIncludeAware
Configure the factory's XInclude awareness.- Parameters:
b
- whether the factory should be XInclude aware- Returns:
- this
-
withExpandEntityReferences
Configure whether the factory's expands entity references.- Parameters:
b
- whether the factory should expand entity references- Returns:
- this
-