title: Parsing/Deserialize XML to JavaObjects
body: <p>i started a small new project and i want to deserialize objects from XML.</p>
  
  <p>i created a xsd:</p>
  
  <p><a href="http://pastebin.com/n1pwjRGX" rel="noreferrer">http://pastebin.com/n1pwjRGX</a></p>
  
  <p>and an example XML File :</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;hdb&gt;
      &lt;country code="DE"&gt;
          &lt;variableHoliday daysAfterEaster="49" name="PENTECOAST" /&gt;
          &lt;fixedHoliday month="JANUARY" day="1" name="NEWYEAR" /&gt;
          &lt;region code="sa"&gt;
              &lt;fixedHoliday month="APRIL" day="1" name="FUNNYDAY" /&gt;
              &lt;variableHoliday daysAfterEaster="0" name="EASTERSUNDAY" /&gt;
          &lt;/region&gt;
          &lt;region code="ba"&gt;
              &lt;variableHoliday daysAfterEaster="12" name="CORPUSCHRISTI" /&gt;
          &lt;/region&gt;
      &lt;/country&gt;
      &lt;country code="US"&gt;
          &lt;fixedHoliday month="JULY" day="4" name="INDEPENDENCEDAY" /&gt;
      &lt;/country&gt;
      &lt;country code="AL"&gt;
          &lt;fixedHoliday month="JULY" day="4" name="INDEPENDENCEDAY" /&gt;
      &lt;/country&gt;
  &lt;/hdb&gt;
  </code></pre>
  
  <p>Which should use the xsd and so on.</p>
  
  <p>So how can i achive the deserialization of these XML to a nice Java-Object Structure?</p>
  
  <p>Mabe like :</p>
  
  <pre><code>class HDB {
      private HashMap&lt;CountryCode,Country&gt; map;
  }
  
  class Country {
      private List&lt;Holiday&gt; list; // or two Lists with &lt;variableHoliday&gt; and &lt;fixedHoliday&gt;
      private List&lt;Region&gt; regions;
  }
  
  class Region{
      private List&lt;Holiday&gt; list; // or two Lists with &lt;variableHoliday&gt; and &lt;fixedHoliday&gt;
  }
  
  class variableHoliday {
      private String name;
      private int daysAfterEaster;
  }
  class fixedHoliday {
      private String name;
      private int day;
      private MonthName month; // while MonthName is an enum defined like the enum from XSD
  }
  </code></pre>
  
  <p>Any ideas how to achive that easy?</p>
  
  <p>I thought of jaxb an tried some stuff, but it seems to me (im a beginner with jaxb) that its hard to achive this XML structure because of maps cant be written like 
  v.</p>