anchor.diff:  
   == Using the Java DSL
   
  -For example the following uses a named DataFormat of _jaxb_ which is
  -configured with a number of Java package names to initialize the
  -http://java.sun.com/javase/6/docs/api/javax/xml/bind/JAXBContext.html[JAXBContext].
  +The following example uses a named DataFormat of `jaxb` which is
  +configured with a Java package name to initialize the
  +https://jakarta.ee/specifications/xml-binding/2.3/apidocs/javax/xml/bind/jaxbcontext[JAXBContext].
   
   [source,java]
   -------------------------------------------------------
  
positive.code: This feature has been tested with Woodstox 3.2.9 and Sun JDK 1.6 StAX
  implementation.
  
  JaxbDataFormat now allows you to customize the XMLStreamWriter used to
  marshal the stream to XML. Using this configuration, you can add your
  own stream writer to completely remove, escape, or replace non-xml
  characters.
  
  [source,java]
  --------------------------------------------------------------------------------------
     JaxbDataFormat customWriterFormat = new JaxbDataFormat("org.apache.camel.foo.bar");
    customWriterFormat.setXmlStreamWriterWrapper(new TestXmlStreamWriter());
  --------------------------------------------------------------------------------------
  
  The following example shows using the Spring DSL and also enabling
  Camel's NonXML filtering:
  
  [source,xml]
  ------------------------------------------------------------------------------------------------------------------------------
  <bean id="testXmlStreamWriterWrapper" class="org.apache.camel.jaxb.TestXmlStreamWriter"/>
  <jaxb filterNonXmlChars="true"  contextPath="org.apache.camel.foo.bar" xmlStreamWriterWrapper="#testXmlStreamWriterWrapper" />
  ------------------------------------------------------------------------------------------------------------------------------
  
  == Working with the ObjectFactory
  
  If you use XJC to create the java class from the schema, you will get an
  ObjectFactory for you JAXB context. Since the ObjectFactory uses
  http://java.sun.com/javase/6/docs/api/javax/xml/bind/JAXBElement.html[JAXBElement]
  to hold the reference of the schema and element instance value,
  jaxbDataformat will ignore the JAXBElement by default and you will get
  the element instance value instead of the JAXBElement object form the
  unmarshaled message body.  +
   If you want to get the JAXBElement object form the unmarshaled message
  body, you need to set the JaxbDataFormat object's ignoreJAXBElement
  property to be false.
  
  == Setting encoding
  
  You can set the *encoding* option to use when marshalling. Its the
  `Marshaller.JAXB_ENCODING` encoding property on the JAXB Marshaller. +
   You can setup which encoding to use when you declare the JAXB data
  format. You can also provide the encoding in the
  Exchange property `Exchange.CHARSET_NAME`. This
  property will overrule the encoding set on the JAXB data format.
  
  In this Spring DSL we have defined to use `iso-8859-1` as the encoding:
  
  == Controlling namespace prefix mapping
  
  *Since Camel 2.11*
  
  When marshalling using xref:jaxb-dataformat.adoc[JAXB] or xref:jaxb-dataformat.adoc[SOAP] then
  the JAXB implementation will automatic assign namespace prefixes, such
  as ns2, ns3, ns4 etc. To control this mapping, Camel allows you to refer
  to a map which contains the desired mapping.
  
  Notice this requires having JAXB-RI 2.1 or better (from SUN) on the
  classpath, as the mapping functionality is dependent on the
  implementation of JAXB, whether its supported.
  
  For example in Spring XML we can define a Map with the mapping. In the
  mapping file below, we map SOAP to use soap as prefix. While our custom
  namespace "http://www.mycompany.com/foo/2" is not using any prefix.
  
  [source,xml]
  -----------------------------------------------------------------------
    <util:map id="myMap">
      <entry key="http://www.w3.org/2003/05/soap-envelope" value="soap"/>
      <!-- we dont want any prefix for our namespace -->
      <entry key="http://www.mycompany.com/foo/2" value=""/>
    </util:map>
  -----------------------------------------------------------------------
  
  To use this in JAXB or SOAP data formats you refer to
  this map, using the `namespacePrefixRef` attribute as shown below. Then
  Camel will lookup in the Registry a `java.util.Map`
  with the id "myMap", which was what we defined above.
  
  [source,xml]
  ----------------------------------------------------------------------------------------
    <marshal>
      <soap version="1.2" contextPath="com.mycompany.foo" namespacePrefixRef="myMap"/>
    </marshal>
  ----------------------------------------------------------------------------------------
  
  == Schema validation
  
  *Since Camel 2.11*
  
  The JAXB Data Format supports validation by
  marshalling and unmarshalling from/to XML. Your can use the prefix
  *classpath:*, *file:* or *http:* to specify how the resource should by
  resolved. You can separate multiple schema files by using the *','*
  character.
  
  Using the Java DSL, you can configure it in the following way:
  
  
negative.code: 
  *Since Camel 2.14*
  
  The `JaxbDataFormat` supports to specify the `SchemaLocation` when marshalling the XML.
  
  Using the Java DSL, you can configure it in the following way:
  
  