title: How to escape special characters on unmarshal xml in JAXB
body: <p>I have next xml file</p>
  
  <pre><code>&lt;xml name="Places"&gt;
      &lt;data&gt;
          &lt;row Code="1" Name="#X1.A&amp;B(City)" /&gt;
      &lt;/data&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>And after I'm executing unmarshal I'm getting exception <code>The reference to entity "B" must end with the ';' delimiter</code> because of ampersand(&amp;) inside Name attribute.</p>
  
  <pre><code>JAXBContext jaxbContext = JAXBContext.newInstance(Root.class);
  Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
  File xml = new File("test2.xml");
  Object obj = unmarshaller.unmarshal(xml);
  </code></pre>
  
  <p>How can I escape those characters?</p>
  
  <p>I've already tried to add CharacterEscapeHandler but it's not working for Unmarshaller</p>
  
  <pre><code>private static class EscapeHandler implements CharacterEscapeHandler {
      @Override
      public void escape(char[] buf, int start, int len, boolean isAttValue,
              Writer out) throws IOException {
             ...
      }
  
  }
  
  unmarshaller.setProperty("com.sun.xml.bind.marshaller.CharacterEscapeHandler", 
  new EscapeHandler());
  </code></pre>
  
  <p>And I'm getting <code>javax.xml.bind.PropertyException: name: com.sun.xml.bind.marshaller.CharacterEscapeHandler</code></p>