title: JAXB ignore fields from processing
body: <p>I have the following class</p>
  
  <pre><code>@XmlRootElement
  public class Test {
  
      @XmlTransient
      private String abc;
  
      @XmlElement
      private String def;
  
  }
  </code></pre>
  
  <p>My question is, I want to use this class to generate two kinds of XMLs</p>
  
  <pre><code>1. With &lt;abc&gt;
  2. without &lt;abc&gt;
  </code></pre>
  
  <p>I can achieve the second one since I have marked it as transient. Is there any way so that if I mark "abc" as <code>@XMLElement</code> and can ignore it while marshalling?</p>
  
  <p>Thanks in advance</p>