code: public void marshal(Object obj, HierarchicalStreamWriter writer,
  			MarshallingContext context) {
  		XLog log = (XLog) obj;
  
  		writer.startNode("XExtensions");
  		context.convertAnother(log.getExtensions());
  		writer.endNode();
  
  		writer.startNode("XAttributeMap");
  		context.convertAnother(log.getAttributes(), XesXStreamPersistency.attributeMapConverter);
  		writer.endNode();
  
  		writer.startNode("XGlobalTraceAttributes");
  		context.convertAnother(log.getGlobalTraceAttributes());
  		writer.endNode();
  
  		writer.startNode("XGlobalEventAttributes");
  		context.convertAnother(log.getGlobalEventAttributes());
  		writer.endNode();
  
  		writer.startNode("XEventClassifiers");
  		context.convertAnother(log.getClassifiers());
  		writer.endNode();
  
  		for (XTrace trace : log) {
  			writer.startNode("XTrace");
  			context.convertAnother(trace,  XesXStreamPersistency.traceConverter);
  			writer.endNode();
  		}
  	}
docs: /*
  (non-Javadoc)
  
  @see
  com.thoughtworks.xstream.converters.Converter#marshal(java.lang.Object,
  com.thoughtworks.xstream.io.HierarchicalStreamWriter,
  com.thoughtworks.xstream.converters.MarshallingContext)