writeTopAttributes(top);
  protected Object writeTopObject(EObject top)  {    EClass eClass = top.eClass();    if (!toDOM)    {      if (extendedMetaData == null || featureTable.getDocumentRoot(eClass.getEPackage()) != eClass)      {        String name = helper.getQName(eClass);        doc.startElement(name);        Object mark = doc.mark();        saveElementID(top);        return mark;      }      else      {        doc.startElement(null);        saveFeatures(top);        return null;      }    }    else    {      if (extendedMetaData == null || extendedMetaData.getDocumentRoot(eClass.getEPackage()) != eClass)      {        helper.populateNameInfo(nameInfo, eClass);        currentNode = document.createElementNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName());        document.appendChild(currentNode);        handler.recordValues(currentNode, null, null, top);        saveElementID(top);        return null;      }      else      {        saveFeatures(top);        return null;      }    }  }