Class XmlFactoryBuilder
java.lang.Object
com.fasterxml.jackson.core.TSFBuilder<XmlFactory,XmlFactoryBuilder>
com.fasterxml.jackson.dataformat.xml.XmlFactoryBuilder
public class XmlFactoryBuilder
extends com.fasterxml.jackson.core.TSFBuilder<XmlFactory,XmlFactoryBuilder>
TSFBuilder
implementation
for constructing XmlFactory
instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClassLoader
OptionalClassLoader
to use for constructingXMLInputFactory
and instances if not explicitly specified by caller.protected int
Set of {@code ToXmlGenerator.Feature}s enabled, as bitmask.protected int
Set ofFromXmlParser.Feature
s enabled, as bitmask.protected String
In cases where a start element has both attributes and non-empty textual value, we have to create a bogus property; we will use this as the property name.protected XmlNameProcessor
SeeXmlNameProcessor
andXmlNameProcessors
protected XMLInputFactory
Stax factory for creating underlying input stream readers; `null` for "use default instance with default settings"protected XMLOutputFactory
Stax factory for creating underlying output stream writers; `null` for "use default instance with default settings"Fields inherited from class com.fasterxml.jackson.core.TSFBuilder
_factoryFeatures, _inputDecorator, _outputDecorator, _streamReadConstraints, _streamReadFeatures, _streamWriteFeatures, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
configure
(FromXmlParser.Feature f, boolean state) configure
(ToXmlGenerator.Feature f, boolean state) protected XMLInputFactory
protected XMLOutputFactory
disable
(FromXmlParser.Feature first, FromXmlParser.Feature... other) disable
(ToXmlGenerator.Feature first, ToXmlGenerator.Feature... other) enable
(FromXmlParser.Feature first, FromXmlParser.Feature... other) enable
(ToXmlGenerator.Feature first, ToXmlGenerator.Feature... other) int
int
inputFactory
(XMLInputFactory xmlIn) Deprecated.nameForTextElement
(String name) outputFactory
(XMLOutputFactory xmlOut) Deprecated.Since 2.13 usexmlOutputFactory()
insteadprotected ClassLoader
Method that can be used to specificClassLoader
for creatingXMLInputFactory
andXMLOutputFactory
instances if those are not explicitly defined by caller: passed to respectivenewFactory()
methods.xmlInputFactory
(XMLInputFactory xmlIn) xmlNameProcessor
(XmlNameProcessor nameProcessor) xmlOutputFactory
(XMLOutputFactory xmlOut) Methods inherited from class com.fasterxml.jackson.core.TSFBuilder
_legacyDisable, _legacyDisable, _legacyEnable, _legacyEnable, _this, configure, configure, configure, configure, configure, disable, disable, disable, disable, disable, disable, disable, disable, disable, enable, enable, enable, enable, enable, enable, enable, enable, enable, factoryFeaturesMask, inputDecorator, inputDecorator, outputDecorator, outputDecorator, streamReadConstraints, streamReadFeatures, streamWriteFeatures
-
Field Details
-
_formatParserFeatures
protected int _formatParserFeaturesSet ofFromXmlParser.Feature
s enabled, as bitmask. -
_formatGeneratorFeatures
protected int _formatGeneratorFeaturesSet of {@code ToXmlGenerator.Feature}s enabled, as bitmask. -
_xmlInputFactory
Stax factory for creating underlying input stream readers; `null` for "use default instance with default settings" -
_xmlOutputFactory
Stax factory for creating underlying output stream writers; `null` for "use default instance with default settings" -
_nameForTextElement
In cases where a start element has both attributes and non-empty textual value, we have to create a bogus property; we will use this as the property name.Name used for pseudo-property used for returning XML Text value (which does not have actual element name to use). Defaults to empty String, but may be changed for interoperability reasons: JAXB, for example, uses "value" as name.
-
_classLoaderForStax
OptionalClassLoader
to use for constructingXMLInputFactory
and instances if not explicitly specified by caller. If not specified, will default toClassLoader
that loaded this class.- Since:
- 2.13
-
_nameProcessor
SeeXmlNameProcessor
andXmlNameProcessors
- Since:
- 2.14
-
-
Constructor Details
-
XmlFactoryBuilder
protected XmlFactoryBuilder() -
XmlFactoryBuilder
-
-
Method Details
-
formatParserFeaturesMask
public int formatParserFeaturesMask() -
formatGeneratorFeaturesMask
public int formatGeneratorFeaturesMask() -
nameForTextElement
-
xmlInputFactory
-
defaultInputFactory
-
xmlOutputFactory
-
defaultOutputFactory
-
staxClassLoader
-
xmlNameProcessor
-
enable
-
enable
-
disable
-
disable
-
configure
-
enable
-
enable
-
disable
-
disable
-
configure
-
nameForTextElement
-
xmlInputFactory
- Since:
- 2.13 (was misnamed as
inputFactory(in) formerly
)
-
xmlOutputFactory
- Since:
- 2.13 (was misnamed as
outputFactory(in) formerly
)
-
inputFactory
Deprecated.Since 2.13 usexmlInputFactory()
instead -
outputFactory
Deprecated.Since 2.13 usexmlOutputFactory()
instead -
staxClassLoader
Method that can be used to specificClassLoader
for creatingXMLInputFactory
andXMLOutputFactory
instances if those are not explicitly defined by caller: passed to respectivenewFactory()
methods.
NOTE: recommended approach is to explicitly passXMLInputFactory
andXMLOutputFactory
methods instead of relying on JDK SPI mechanism.- Since:
- 2.13
-
xmlNameProcessor
- Since:
- 2.14
-
build
- Specified by:
build
in classcom.fasterxml.jackson.core.TSFBuilder<XmlFactory,
XmlFactoryBuilder>
-
xmlInputFactory()
instead