title: how to get rid of outer-class reference in xstream output?
body: <p>I use xstream to marshal an object with nested class to xml string, 
  I write this:</p>
  
  <pre><code>public static String java2xml(Object obj, Class&lt;?&gt; T) {
  
      XStream xstream = new XStream(new StaxDriver());
      xstream.processAnnotations(T);
      String xml = xstream.toXML(obj);
  
      return xml;
  }   
  </code></pre>
  
  <p>Yet I got a <code>&lt;outer-class reference="../.."/&gt;</code> inside the output string.</p>
  
  <p>the object class is:</p>
  
  <pre><code>public class Foo {
      private String foocontent;
      private Bar bar;
  
      // getter and setter
  
  
      public class Bar {
          private String blabla;
          // getter and setter
      }
  
  }
  </code></pre>
  
  <p>and I make a <code>Foo</code> with this code:</p>
  
  <pre><code>    Foo foo = new Foo();
      Bar bar = foo.new Bar();
      bar.setBlabla("hello");
      foo.setBar(bar);
      String fooxml = Xutil.java2xml(foo, Foo.class);
      System.out.println(fooxml);
  </code></pre>
  
  <p>and the whole xml is:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;me.mypackage.Foo&gt;
      &lt;bar&gt;
          &lt;blabla&gt;hello&lt;/blabla&gt;
          &lt;outer-class reference="../.."/&gt;
      &lt;/bar&gt;
  &lt;/me.mypackage.Foo&gt;
  </code></pre>
  
  <p>Question1: How can I get rid of <code>outer-class</code> part?</p>
  
  <p>Question2: how to make a pretty-formatted xml string with xstream?</p>
  
  <p>In the previous post I have much emotional comments and make my question unclear, I edit my post and list the help I'm asking, thank you.</p>