((Element)currentNode).setAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName(), svalue);
Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()); attr.setNodeValue(svalue); ((Element)currentNode).setAttributeNodeNS(attr); handler.recordValues(attr, o, f, value);
  protected void saveAttributeFeatureMap(EObject o, EStructuralFeature f)  {    List values = (List)helper.getValue(o, f);    int size = values.size();    Set repeats = null;    for (int i = 0; i < size; i++)    {      FeatureMap.Entry entry = (FeatureMap.Entry)values.get(i);      EStructuralFeature entryFeature = entry.getEStructuralFeature();      if (entryFeature instanceof EReference)      {        EReference referenceEntryFeature = (EReference)entryFeature;        if (referenceEntryFeature.isMany())        {          if (repeats == null)          {            repeats = new HashSet();          }          else if (repeats.contains(referenceEntryFeature))          {            continue;          }                    repeats.add(referenceEntryFeature);                    if (referenceEntryFeature.isResolveProxies())          {            saveEObjectMany(o, entryFeature);          }          else          {            saveIDRefMany(o, entryFeature);          }        }        else        {          if (referenceEntryFeature.isResolveProxies())          {            saveEObjectSingle(o, entryFeature);          }          else          {            saveIDRefSingle(o, entryFeature);          }        }      }      else      {        Object value = entry.getValue();        String svalue = getDatatypeValue(value, entryFeature);        if (!toDOM)        {          doc.addAttribute(helper.getQName(entryFeature), svalue);        }        else        {          helper.populateNameInfo(nameInfo, entryFeature);          ((Element)currentNode).setAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName(), svalue);        }      }    }  }