Package org.xmlunit.util
Class DocumentBuilderFactoryConfigurer.Builder
- java.lang.Object
-
- org.xmlunit.util.DocumentBuilderFactoryConfigurer.Builder
-
- Enclosing class:
- DocumentBuilderFactoryConfigurer
public static class DocumentBuilderFactoryConfigurer.Builder extends Object
Builder for a DocumentBuilderFactoryConfigurer.- Since:
- XMLUnit 2.6.0
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentBuilderFactoryConfigurerbuild()Builds a DocumentBuilderFactoryConfigurer.DocumentBuilderFactoryConfigurer.BuilderwithAttribute(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.DocumentBuilderFactoryConfigurer.BuilderwithDTDLoadingDisabled()Configures the factory to not load any external DTDs.DocumentBuilderFactoryConfigurer.BuilderwithDTDParsingDisabled()Configures the factory to not parse any DTDs.DocumentBuilderFactoryConfigurer.BuilderwithExpandEntityReferences(boolean b)Configure whether the factory's expands entity references.DocumentBuilderFactoryConfigurer.BuilderwithFeature(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.DocumentBuilderFactoryConfigurer.BuilderwithSafeAttribute(String key, Object value)Configures the factory with the given attribute if it is supported.DocumentBuilderFactoryConfigurer.BuilderwithSafeFeature(String key, boolean value)Configures the factory with the given feature if it is supported.DocumentBuilderFactoryConfigurer.BuilderwithXIncludeAware(boolean b)Configure the factory's XInclude awareness.
-
-
-
Method Detail
-
build
public DocumentBuilderFactoryConfigurer build()
Builds a DocumentBuilderFactoryConfigurer.- Returns:
- the built configurer
-
withAttribute
public DocumentBuilderFactoryConfigurer.Builder 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.- Parameters:
key- key of the attributevalue- value for the attribute- Returns:
- this
-
withSafeAttribute
public DocumentBuilderFactoryConfigurer.Builder withSafeAttribute(String key, Object value)
Configures the factory with the given attribute if it is supported.- Parameters:
key- key of the attributevalue- value for the attribute- Returns:
- this
-
withFeature
public DocumentBuilderFactoryConfigurer.Builder 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.- Parameters:
key- key of the featurevalue- value for the feature- Returns:
- this
-
withSafeFeature
public DocumentBuilderFactoryConfigurer.Builder withSafeFeature(String key, boolean value)
Configures the factory with the given feature if it is supported.- Parameters:
key- key of the featurevalue- value for the feature- Returns:
- this
-
withDTDLoadingDisabled
public DocumentBuilderFactoryConfigurer.Builder withDTDLoadingDisabled()
Configures the factory to not load any external DTDs.- Returns:
- this
-
withDTDParsingDisabled
public DocumentBuilderFactoryConfigurer.Builder withDTDParsingDisabled()
Configures the factory to not parse any DTDs.- Returns:
- this
-
withXIncludeAware
public DocumentBuilderFactoryConfigurer.Builder withXIncludeAware(boolean b)
Configure the factory's XInclude awareness.- Parameters:
b- whether the factory should be XInclude aware- Returns:
- this
-
withExpandEntityReferences
public DocumentBuilderFactoryConfigurer.Builder withExpandEntityReferences(boolean b)
Configure whether the factory's expands entity references.- Parameters:
b- whether the factory should expand entity references- Returns:
- this
-
-