title: JAXB Java generating XML, Why lowercase?
body: <p>When I run this code:</p>
  
  <pre><code>import javax.xml.bind.JAXBContext;
  import javax.xml.bind.Marshaller;
  import javax.xml.bind.annotation.XmlAccessType;
  import javax.xml.bind.annotation.XmlAccessorType;
  import javax.xml.bind.annotation.XmlRootElement;
  
  public class JavaToXMLDemo {
    public static void main(String[] args) throws Exception {
      JAXBContext context = JAXBContext.newInstance(Employee.class);
  
      Marshaller m = context.createMarshaller();
      m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
  
      Employee object = new Employee();
      object.setCode("CA");
      object.setName("Cath");
      object.setSalary(300);
  
      m.marshal(object, System.out);
  
    }
  }
  
  @XmlRootElement
  @XmlAccessorType(XmlAccessType.FIELD)
  class Employee {
    private String code;
  
    private String name;
  
    private int salary;
  
    public String getCode() {
      return code;
    }
  
    public void setCode(String code) {
      this.code = code;
    }
  
    public String getName() {
      return name;
    }
  
    public void setName(String name) {
      this.name = name;
    }
  
    public int getSalary() {
      return salary;
    }
  
    public void setSalary(int population) {
      this.salary = population;
    }
  }
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;employee&gt;
      &lt;code&gt;CA&lt;/code&gt;
      &lt;name&gt;Cath&lt;/name&gt;
      &lt;salary&gt;300&lt;/salary&gt;
  &lt;/employee&gt;
  </code></pre>
  
  <p>Which is correct, so my question is why does it change the Employee to employee?
  Is it possible to make it print with uppercase E, instead of employee?</p>
  
  <p>This is what I actually wanted to have:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;Employee&gt;
      &lt;code&gt;CA&lt;/code&gt;
      &lt;name&gt;Cath&lt;/name&gt;
      &lt;salary&gt;300&lt;/salary&gt;
  &lt;/Employee&gt;
  </code></pre>
  
  <p>Thanks!</p>