Annotation Interface XmlNameFromClass


@Retention(RUNTIME) public @interface XmlNameFromClass
Instructs the parser to ignore the field name and use the name from the class. The parser will also honor the @XmlName annotation on the class.
 
     class Envelope {
         @XmlNameFromClass
         public Object body = new MyBody();
     }

     @XmlName("custom")
     class MyBody {
         ...
     }
 
 
Serializes into:
 
     <Envelope><custom></custom></Envelope>