ObjectMapper that will read and write XML instead of JSON,
using XML-backed tools.jackson.core.TokenStreamFactory
implementation (XmlFactory), operation on STAX
javax.xml.stream.XMLStreamReader s and
javax.xml.stream.XMLStreamWriter s.
Mapper itself overrides some aspects of functionality to try to handle data binding aspects as similar to JAXB as possible.
| Modifier and Type | Class and Description |
|---|---|
| public static class | XmlMapper.
Builder implementation for constructing |
| private static class | XmlMapper.
Helper class to contain dynamically constructed "shared" instance of
mapper, should one be needed via |
| protected static class | XmlMapper.
Saved configuration entity to use with builder for |
| Modifier and Type | Field and Description |
|---|---|
| protected static final DefaultXmlPrettyPrinter | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static XmlMapper. | |
| public static XmlMapper. | |
| public static XmlMapper. | builderWithJackson2Defaults()
The builder returned uses default settings more closely matching the default configs used in Jackson 2.x versions. |
| public ToXmlGenerator | createGenerator(XMLStreamWriter w)
Overloaded variant that allows constructing |
| public FromXmlParser | createParser(XMLStreamReader r)
Overloaded variant that allows constructing |
| protected Object | |
| public <T> T | readValue(XMLStreamReader r, Class<T> valueType)
Method for reading a single XML value from given XML-specific input
source; useful for incremental data-binding, combining traversal using
basic Stax |
| public <T> T | readValue(XMLStreamReader r, TypeReference<T> valueTypeRef)
Method for reading a single XML value from given XML-specific input
source; useful for incremental data-binding, combining traversal using
basic Stax |
| public <T> T | readValue(XMLStreamReader r, JavaType valueType)
Method for reading a single XML value from given XML-specific input
source; useful for incremental data-binding, combining traversal using
basic Stax |
| public XmlMapper. | rebuild()
Overrides tools. Method for creating a new |
| public static XmlMapper | |
| public XmlFactory | tokenStreamFactory()
Overrides tools. Method that can be used to get hold of |
| public Version | version()
Overrides tools. Implements tools. Method that will return version information stored in and read from jar that contains this class. |
| protected Object | |
| public void | writeValue(XMLStreamWriter w, Object value)
Method for serializing given value using specific |
| public static XmlMapper. |