code: @SuppressWarnings("unchecked")
  	public void marshal(Object obj, HierarchicalStreamWriter writer,
  			MarshallingContext context) {
  		XAttributeMap map = (XAttributeMap) obj;
  		String lazy = "false";
  		String buffered = "false";
  		// register, whether lazy attribute map has been used,
  		// and whether the implementation is buffered.
  		if (map instanceof XAttributeMapLazyImpl) {
  			lazy = "true";
  			if (((XAttributeMapLazyImpl) map).getBackingStoreClass().equals(
  					XAttributeMapBufferedImpl.class)) {
  				buffered = "true";
  			}
  		} else if (map instanceof XAttributeMapBufferedImpl) {
  			buffered = "true";
  		}
  		writer.addAttribute("lazy", lazy);
  		writer.addAttribute("buffered", buffered);
  		Collection<XAttribute> childAttributes = map.values();
  		XAttribute parent = (XAttribute) context.get(XAttributeConverter.PARENT);
  		if (parent instanceof XAttributeCollection) {
  			childAttributes = ((XAttributeCollection) parent).getCollection();
  		}
  		for (XAttribute attribute : childAttributes) {
  			writer.startNode("XAttribute");
  			context.convertAnother(attribute,
  					XesXStreamPersistency.attributeConverter);
  			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)