- All Implemented Interfaces:
Serializable,Comparable<XmlReadFeature>,Constable,tools.jackson.core.FormatFeature,tools.jackson.core.util.JacksonFeature
Enumeration that defines all togglable features for XML parsers.
NOTE: in Jackson 2.x this was named FromXmlParser.Feature.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFeature that enables automatic conversion of incoming "xsi:type" (where "type" is the local name and "xsi" prefix is bound to URIXMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI), into Jackson simple Property Name of"xsi:type".Feature that indicates whether empty XML elements (both empty tags like<tag />and<tag></tag>(with no intervening cdata) are exposed asJsonToken.VALUE_NULL) or not.Feature that indicates whether XML Schema Instance attributexsi:nilwill be processed automatically -- to indicatenullvalues -- or not. -
Method Summary
Modifier and TypeMethodDescriptionstatic intMethod that calculates bit set (flags) of all features that are enabled by default.booleanbooleanenabledIn(int flags) intgetMask()static XmlReadFeatureReturns the enum constant of this class with the specified name.static XmlReadFeature[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO_DETECT_XSI_TYPE
Feature that enables automatic conversion of incoming "xsi:type" (where "type" is the local name and "xsi" prefix is bound to URIXMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI), into Jackson simple Property Name of"xsi:type". This is usually needed to read content written using matchingToXmlGenerator.Feature#AUTO_DETECT_XSI_TYPEfeature, usually used for Polymorphic handling where it is difficult to specify proper XML Namespace for type identifier.Default setting is
true(wasfalsein Jackson 2.x). -
EMPTY_ELEMENT_AS_NULL
Feature that indicates whether empty XML elements (both empty tags like<tag />and<tag></tag>(with no intervening cdata) are exposed asJsonToken.VALUE_NULL) or not. If they are not returned as `null` tokens, they will be returned asJsonToken.VALUE_STRINGtokens with textual value of "" (empty String).NOTE: in Jackson 2.x, only "true" empty tags were affected, not split ones. With 3.x both cases handled uniformly.
Default setting is
false. -
PROCESS_XSI_NIL
Feature that indicates whether XML Schema Instance attributexsi:nilwill be processed automatically -- to indicatenullvalues -- or not. If enabled,xsi:nilattribute on any XML element will mark such elements as "null values" and any other attributes or child elements they might have to be ignored. If disabled this attribute will be exposed like any other attribute.Default setting is
true.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
collectDefaults
public static int collectDefaults()Method that calculates bit set (flags) of all features that are enabled by default. -
enabledByDefault
public boolean enabledByDefault()- Specified by:
enabledByDefaultin interfacetools.jackson.core.util.JacksonFeature
-
getMask
public int getMask()- Specified by:
getMaskin interfacetools.jackson.core.util.JacksonFeature
-
enabledIn
public boolean enabledIn(int flags) - Specified by:
enabledInin interfacetools.jackson.core.util.JacksonFeature
-