title: Correct way to construct this xml using Xstream
body: <p>I'm trying to achieve the following using XStream:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;rows&gt;
      &lt;row id="EventID"&gt;
          &lt;cell&gt;false&lt;/cell&gt;
          &lt;cell&gt;Mainland&lt;/cell&gt;
          &lt;cell&gt;&lt;/cell&gt;
          &lt;cell&gt;&lt;/cell&gt;
  
          &lt;row id = "StoreID"&gt;
              &lt;cell&gt;&lt;/cell&gt;
              &lt;cell&gt;&lt;/cell&gt;
              &lt;cell&gt;&lt;/cell&gt;
              &lt;cell&gt;&lt;/cell&gt;
          &lt;/row&gt;
  
      &lt;/row&gt;
  &lt;/rows&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here we can see that the row with id of "StoreID" is actually a child row of the "EventID" row. I can create both seperately by doing the following: </p>
  
  <pre><code>    String xml = "", eventXML = "", storeXml = "";
      StringBuffer buff = new StringBuffer(1000);
      buff.append("&lt;?xml version='1.0' encoding='iso-8859-1'?&gt;");
  
      XStream xstream = new XStream(new DomDriver());
  
  
      xstream.alias("rows", List.class);
      xstream.alias("row", Event.class);
  
      xstream.registerConverter(evtConverter);
  
      for( Event e: events )
      {
          // Get a list of stores
          Store store = e.getStore();
          xstream.registerConverter( storeConverter, XStream.PRIORITY_VERY_HIGH );
  
          xstream.alias("row", Store.class);
          storeXml = xstream.toXML( store );
  
          xml = xstream.toXML(e);
      }
      return xml;
  </code></pre>
  
  <p>So how can I go about combining them? Is there a way to stop the automatic closure of the xml (the Event object) so that I can add in the Store xml?</p>
  
  <p>Thanks</p>