title: Prevent JAXB unmarshaller from escaping special characters by default
body: <p>I have an XML file which contains an element with special characters or escape characters in it. When I unmarshall this file into a Java object, JAXB automatically escapes these characters. However I do not want them to be escaped and the object should be populated with whatever value is present in the XML file.
  Snippet of my XML file looks something like this:</p>
  
  <pre><code>            &lt;Order&gt;
                    &lt;name&gt;Order One &amp;gt;&lt;/name&gt;
                    &lt;price&gt;50&lt;/price&gt;
              &lt;Order&gt;
  </code></pre>
  
  <p>My JAXB Order class looks like below:</p>
  
  <pre><code>            @XmlAccessorType(XmlAccessType.FIELD)
              @XmlRootElement(name = "Order")
              public class Order{
  
                   @XmlElement
                   private String name;
  
                   @XmlElement
                   private String price;
  
                   //skipping getter and setter for brevity
  </code></pre>
  
  <p>On unmarshalling , Order class object's name field has value "Order one >" whereas I want it to be "Order One <code>&amp;gt;</code>" as that is the requirement.</p>
  
  <p>I am aware of the solution of putting this value within CDATA so that it doesn't get escaped however the XML file I am unmarshalling is from an outside source and I have no control over the file.
  I read about a solution on SO where it was suggested of looking for '&amp;' and replacing it. But that solution doesnt look generic and wont apply to all scenarios.
  <a href="https://stackoverflow.com/questions/9296476/unmarshalling-xml-with-jaxb-without-unescaping-characters">Unmarshalling XML with JAXB without unescaping characters</a></p>
  
  <p>I am new to the world of JAXB and trying to find my feet. What I am trying to do might have been done before but I haven't found a solution for doing it. 
  There are several solutions available on SO about escaping characters with JAXB however almost all talk about marshalling.
  Any help would be appreciated.</p>