public class MappingJackson2XmlView extends AbstractJackson2View
View that renders XML content by serializing the model for the current request
 using Jackson 2's XmlMapper.
 The Object to be serialized is supplied as a parameter in the model. The first serializable
 entry is used. Users can either specify a specific entry in the model via the
 sourceKey property.
 
The default constructor uses the default configuration provided by Jackson2ObjectMapperBuilder.
 
Compatible with Jackson 2.6 and higher, as of Spring 4.3.
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | DEFAULT_CONTENT_TYPE | 
updateContentLengthloggerPATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE| Constructor and Description | 
|---|
| MappingJackson2XmlView()Construct a new  MappingJackson2XmlViewusing default configuration
 provided byJackson2ObjectMapperBuilderand setting the content type
 toapplication/xml. | 
| MappingJackson2XmlView(XmlMapper xmlMapper)Construct a new  MappingJackson2XmlViewusing the providedXmlMapperand setting the content type toapplication/xml. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected java.lang.Object | filterModel(java.util.Map<java.lang.String,java.lang.Object> model)Filter out undesired attributes from the given model. | 
| void | setModelKey(java.lang.String modelKey)Set the attribute in the model that should be rendered by this view. | 
filterAndWrapModel, getEncoding, getObjectMapper, prepareResponse, renderMergedOutputModel, setDisableCaching, setEncoding, setObjectMapper, setPrettyPrint, setUpdateContentLength, writeContent, writePrefix, writeSuffixaddStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, toString, writeToResponsegetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextgetApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContextpublic static final java.lang.String DEFAULT_CONTENT_TYPE
public MappingJackson2XmlView()
MappingJackson2XmlView using default configuration
 provided by Jackson2ObjectMapperBuilder and setting the content type
 to application/xml.public void setModelKey(java.lang.String modelKey)
setModelKey in class AbstractJackson2Viewprotected java.lang.Object filterModel(java.util.Map<java.lang.String,java.lang.Object> model)
Map or a single value object.filterModel in class AbstractJackson2Viewmodel - the model, as passed on to AbstractJackson2View.renderMergedOutputModel(java.util.Map<java.lang.String, java.lang.Object>, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)