title: @XmlEnum on attribute with JAXB
body: <p>I have a problem to create enum with jaxb to generate the xml that i want, i tried to use the @xmlEnum annotation but not with an attribute !</p>
  
  <p>I'll give you the example to clarify that : </p>
  
  <p><strong>XML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes" ?&gt;
  &lt;FilePollerConfiguration configFilePath=""&gt;
      &lt;Directory path="C://Users//jmoreau040612//Desktop//Old"&gt;
          &lt;Match pattern="*.xml"&gt;
              &lt;Event name="create | modify | delete"&gt; //here i want the enum in attribute
             &lt;FTPSend&gt;
            &lt;FTPServer&gt;toto.sgcib.com&lt;/FTPServer&gt;
            &lt;FTPPort&gt;21&lt;/FTPPort&gt;
            &lt;FTPLogin&gt;toto&lt;/FTPLogin&gt;
            &lt;FTPPassword&gt;titi&lt;/FTPPassword&gt;
                    &lt;FTPDestinationPath&gt;/root/src&lt;/FTPDestinationPath&gt;
        &lt;/FTPSend&gt;
         &lt;/Event&gt;
     &lt;/Match&gt;
     &lt;Match pattern="*.csv"&gt;
         &lt;Event name="create | modify | delete"&gt; //here i want the enum in attribute
             &lt;MailSend&gt;
             &lt;SMTPServer&gt;smtp.fr.socgen&lt;/SMTPServer&gt;
             &lt;SMTPPort&gt;25&lt;/SMTPPort&gt;
             &lt;MailTo&gt;toto@sgcib.com&lt;/MailTo&gt;
             &lt;MailFrom&gt;titi@sgcib.com&lt;/MailFrom&gt;
             &lt;Subject&gt;tata&lt;/Subject&gt;
             &lt;Body&gt;blabla&lt;/Body&gt;
         &lt;/MailSend&gt;
          &lt;/Event&gt;
      &lt;/Match&gt;
  &lt;/Directory&gt;
  &lt;/FilePollerConfiguration&gt;
  </code></pre>
  
  <p>And i have the following code for tha <strong>java</strong> part :</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  public class Event {
  
       //I would like this enum in attribute of "Event"
  @XmlType
  @XmlEnum(String.class)
  public enum name{
      @XmlEnumValue("create") CREATE,
      @XmlEnumValue("modify") MODIFY,
      @XmlEnumValue("delete") DELETE
  }
  
  @XmlElements(value = {
           @XmlElement(type=FTPSendConfiguration.class, name="FTPSend"),
           @XmlElement(type=SFTPSendConfiguration.class, name="SFTPSend"),
           @XmlElement(type=MailSendConfiguration.class, name="MailSend"),
           @XmlElement(type=
                   ServerToServerSendConfiguration.class,    name="ServerToServer")
  })
  ArrayList&lt;IAction&gt; actionsList = new ArrayList&lt;IAction&gt;();
  
  public Event(){
  
  }
  
  public ArrayList&lt;IAction&gt; getActionsList() {
      return actionsList;
  }
  
  public void setActionsList(ArrayList&lt;IAction&gt; actionsList) {
      this.actionsList = actionsList;
  }
  
  }
  </code></pre>
  
  <p>So if you have an idea you're welcome =)</p>
  
  <p>Thanks.</p>