title: How to read XML styled text file in java?
body: <p>I want to read below XML file in Java which is in text format,</p>
  
  <p><strong>XML File:</strong></p>
  
  <pre><code>    &lt;Sample&gt;
       &lt;DATA&gt;
         &lt;ID&gt;12345&lt;/ID&gt;
         &lt;NAME&gt;Person1&lt;/NAME&gt;
         &lt;MAIL&gt;sa@gmail.com&lt;/MAIL&gt;
         &lt;Class&gt;A&amp;B&lt;/Class&gt;
      &lt;/DATA&gt;
      &lt;DATA&gt;
         &lt;ID&gt;12345&lt;/ID&gt;
         &lt;NAME&gt;Person1&lt;/NAME&gt;
         &lt;MAIL&gt;sa@gmail.com&lt;/MAIL&gt;
         &lt;Class&gt;A&lt;B&lt;/Class&gt;
      &lt;/DATA&gt;
     &lt;/Sample&gt;
  </code></pre>
  
  <p>I was used JAXB to read this xml file, for this i have added a POJO class too with annotation. While unmarshalling the XMl file am getting a below exception </p>
  
  <pre><code>[org.xml.sax.SAXParseException : The entity must immediately follow the '&amp;' in the entity reference.]
  </code></pre>
  
  <p>Can any one suggest me a best approach to read this xml?</p>