handler.recordEObject(currentNode, top, null, null);
handler.recordValues(currentNode, null, null, top);
  public Object writeTopObjects(List contents)  {    if (!toDOM)    {      doc.startElement(XMI_TAG_NS);      Object mark = doc.mark();      for (int i = 0, size = contents.size(); i < size; i++)      {        EObject top = (EObject)contents.get(i);        EClass eClass = top.eClass();        String name = helper.getQName(eClass);        doc.startElement(name);        saveElementID(top);      }      doc.endElement();      return mark;    }    else    {      // create dummy documentElement      currentNode = document.createElementNS(XMIResource.XMI_URI, XMI_TAG_NS);      document.appendChild(currentNode);      for (int i = 0, size = contents.size(); i < size; i++)      {        EObject top = (EObject)contents.get(i);        EClass eClass = top.eClass();        helper.populateNameInfo(nameInfo, eClass);        currentNode = currentNode.appendChild(document.createElementNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()));        handler.recordEObject(currentNode, top, null, null);        saveElementID(top);      }      return null;    }  }