title: Mapping Inheritance with XStream
body: <p>When marshaling classes with inheritance only the child most class data is persisted.</p>
  
  <p>For example, with the code:</p>
  
  <pre><code>public class Test {
  
      static class Person {
          String name;
      }
  
      static class Employee extends Person {
          String job;
      }
  
      public static void main(String[] args) {
          Employee me = new Employee();
          me.name = "Sam";
          me.job = "Developer";
          XStream xStream = new XStream();
          xStream.alias("employee", Employee.class);
          String xml = xStream.toXML(me);
          System.out.println(xml);
      }
  }
  </code></pre>
  
  <p>My output looks like:</p>
  
  <pre><code>&lt;employee&gt;
    &lt;job&gt;Developer&lt;/job&gt;
  &lt;/employee&gt;
  </code></pre>
  
  <p>How can I get XStream to output the parent class data?</p>