title: What is the difference between Castor XML binding and JAXB binding
body: <p>What is the difference between Castor XML and JAXB binding since both are binding java object to XML and vice versa. </p>
  
  <p><strong>Updated :</strong></p>
  
  <p>As using Castor I can do this Assume <code>packageA.ClassA</code> and <code>packageB.ClassA</code> have same attributes and class name just that they were located in different package.</p>
  
  <pre><code>packageA.ClassA - &gt; XML -&gt; packageB.ClassA 
  </code></pre>
  
  <p>By using JAXB if I am doing this Marshall object <code>packageA.ClassA</code> to XML and from XML unmarshall into object <code>packageB.ClassA</code> I got Casting error. </p>