Package org.xmlunit.util
Class DocumentBuilderFactoryConfigurer.Builder
- java.lang.Object
-
- org.xmlunit.util.DocumentBuilderFactoryConfigurer.Builder
-
- Enclosing class:
- DocumentBuilderFactoryConfigurer
public static class DocumentBuilderFactoryConfigurer.Builder extends java.lang.Object
Builder for a DocumentBuilderFactoryConfigurer.- Since:
- XMLUnit 2.6.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Object>
attributes
private static java.util.List<java.lang.String>
DTD_LOAD_DISABLERS
private static java.util.List<java.lang.String>
DTD_PARSE_DISABLERS
private boolean
expandEntityRefs
private java.util.Map<java.lang.String,java.lang.Boolean>
features
private java.util.Map<java.lang.String,java.lang.Object>
safeAttributes
private java.util.Map<java.lang.String,java.lang.Boolean>
safeFeatures
private boolean
xIncludeAware
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentBuilderFactoryConfigurer
build()
Builds a DocumentBuilderFactoryConfigurer.DocumentBuilderFactoryConfigurer.Builder
withAttribute(java.lang.String key, java.lang.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.Builder
withDTDLoadingDisabled()
Configures the factory to not load any external DTDs.DocumentBuilderFactoryConfigurer.Builder
withDTDParsingDisabled()
Configures the factory to not parse any DTDs.DocumentBuilderFactoryConfigurer.Builder
withExpandEntityReferences(boolean b)
Configure whether the factory's expands entity references.DocumentBuilderFactoryConfigurer.Builder
withFeature(java.lang.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.Builder
withSafeAttribute(java.lang.String key, java.lang.Object value)
Configures the factory with the given attribute if it is supported.DocumentBuilderFactoryConfigurer.Builder
withSafeFeature(java.lang.String key, boolean value)
Configures the factory with the given feature if it is supported.DocumentBuilderFactoryConfigurer.Builder
withXIncludeAware(boolean b)
Configure the factory's XInclude awareness.
-
-
-
Field Detail
-
attributes
private final java.util.Map<java.lang.String,java.lang.Object> attributes
-
safeAttributes
private final java.util.Map<java.lang.String,java.lang.Object> safeAttributes
-
features
private final java.util.Map<java.lang.String,java.lang.Boolean> features
-
safeFeatures
private final java.util.Map<java.lang.String,java.lang.Boolean> safeFeatures
-
xIncludeAware
private boolean xIncludeAware
-
expandEntityRefs
private boolean expandEntityRefs
-
DTD_LOAD_DISABLERS
private static final java.util.List<java.lang.String> DTD_LOAD_DISABLERS
-
DTD_PARSE_DISABLERS
private static final java.util.List<java.lang.String> DTD_PARSE_DISABLERS
-
-
Method Detail
-
build
public DocumentBuilderFactoryConfigurer build()
Builds a DocumentBuilderFactoryConfigurer.
-
withAttribute
public DocumentBuilderFactoryConfigurer.Builder withAttribute(java.lang.String key, java.lang.Object value)
Configures the factory with the given attribute, causes an exception inDocumentBuilderFactoryConfigurer.configure(javax.xml.parsers.DocumentBuilderFactory)
if the attribute is not supported.
-
withSafeAttribute
public DocumentBuilderFactoryConfigurer.Builder withSafeAttribute(java.lang.String key, java.lang.Object value)
Configures the factory with the given attribute if it is supported.
-
withFeature
public DocumentBuilderFactoryConfigurer.Builder withFeature(java.lang.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.
-
withSafeFeature
public DocumentBuilderFactoryConfigurer.Builder withSafeFeature(java.lang.String key, boolean value)
Configures the factory with the given feature if it is supported.
-
withDTDLoadingDisabled
public DocumentBuilderFactoryConfigurer.Builder withDTDLoadingDisabled()
Configures the factory to not load any external DTDs.
-
withDTDParsingDisabled
public DocumentBuilderFactoryConfigurer.Builder withDTDParsingDisabled()
Configures the factory to not parse any DTDs.
-
withXIncludeAware
public DocumentBuilderFactoryConfigurer.Builder withXIncludeAware(boolean b)
Configure the factory's XInclude awareness.
-
withExpandEntityReferences
public DocumentBuilderFactoryConfigurer.Builder withExpandEntityReferences(boolean b)
Configure whether the factory's expands entity references.
-
-