String stringValue = value.toString();
String svalue = value.toString();
  protected boolean saveElementFeatureMap(EObject o, EStructuralFeature f)  {    List values = (List)helper.getValue(o, f);    int size = values.size();    for (int i = 0; i < size; i++)    {      FeatureMap.Entry entry = (FeatureMap.Entry)values.get(i);      EStructuralFeature entryFeature = entry.getEStructuralFeature();      Object value = entry.getValue();      if (entryFeature instanceof EReference)      {        if (value == null)        {          saveNil(entryFeature);        }        else         {          EReference referenceEntryFeature = (EReference)entryFeature;          if (referenceEntryFeature.isContainment())          {            saveElement((EObject)value, entryFeature);          }          else if (referenceEntryFeature.isResolveProxies())          {            saveElementReference((EObject)value, entryFeature);          }          else          {            saveElementIDRef((EObject)value, entryFeature);          }        }      }      else      {        if (entryFeature == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_Text())        {          String stringValue = value.toString();          if (escape != null)          {            stringValue = escape.convertText(stringValue);          }          doc.addText(stringValue);        }        else if (entryFeature == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_CDATA())        {          String stringValue = value.toString();          if (escape != null)          {            stringValue = escape.convertLines(stringValue);          }          doc.addCDATA(stringValue);        }        else if (entryFeature == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_Comment())        {          String stringValue = value.toString();          if (escape != null)          {            stringValue = escape.convertLines(stringValue);          }          doc.addComment(stringValue);        }        else if (value == null)        {          saveNil(entryFeature);        }        else        {          doc.startElement(helper.getQName(entryFeature));          EDataType d = (EDataType)entryFeature.getEType();          EPackage ePackage = d.getEPackage();          EFactory fac = ePackage.getEFactoryInstance();          String svalue = helper.convertToString(fac, d, value);          if (escape != null)          {            svalue = escape.convertText(svalue);          }          doc.endContentElement(svalue);        }      }    }    return size > 0;  }