title: SimpleXML enum case-sensitivity
body: <p>I have been trying to create an XML using the simplexml library (v2.6.2) 
  <a href="http://simple.sourceforge.net/home.php" rel="nofollow">http://simple.sourceforge.net/home.php</a></p>
  
  <p>The XML I want to create has to hold an enum value, which should be case-sensitive. Following is the POJO :</p>
  
  <pre><code> package pojos;
  
  public enum MyEnum {
  
      NEW("new"),
      OLD("old");
  
       private final String value;
  
       MyEnum(String v)
       {
           value = v;
       }
  
       public String value() {
              return value;
          }
  
          public static MyEnum fromValue(String v) {
              for (MyEnum c: MyEnum.values()) {
                  if (c.value.equals(v)) {
                      return c;
                  }
              }
              throw new IllegalArgumentException(v);
          }
  
  }
  </code></pre>
  
  <p>Following is the serializer code :</p>
  
  <pre><code>import java.io.File;
  
  import org.simpleframework.xml.Serializer;
  import org.simpleframework.xml.core.Persister;
  
  import pojos.MyEnum;
  
  
  public class TestEnum {
  
      /**
       * @param args
       * @throws Exception 
       */
      public static void main(String[] args) throws Exception {
          // TODO Auto-generated method stub
  
          Serializer serializer = new Persister();
          MyEnum example = MyEnum.NEW;
          File result = new File("myenum.xml");
  
          serializer.write(example, result);
  
      }
  
  }
  </code></pre>
  
  <p>The resultant output :</p>
  
  <pre><code>&lt;myEnum&gt;NEW&lt;/myEnum&gt;
  </code></pre>
  
  <p>The desired output :</p>
  
  <pre><code>&lt;myEnum&gt;new&lt;/myEnum&gt;
  </code></pre>
  
  <p>How should I proceed ? I cannot change the variable name in the enum as it happens to be the keyword "new" !</p>
  
  <p>Thanks.</p>