Element elem = document.createElementNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()); handler.recordEObject(elem, remote, remote.eContainer(), f); System.out.println("-->remote: "+elem.getNodeName()+": "+remote.eClass().getName()+"; "+f.getName()); elem.appendChild(document.createTextNode(href));
Element elem = document.createElementNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()); Node text = document.createTextNode(href); elem.appendChild(text);
  protected void saveElementReference(EObject remote, EStructuralFeature f)  {    String href = helper.getHREF(remote);    if (href != null)    {      if (escapeURI != null)      {        href = escapeURI.convert(href);      }      if (!toDOM)      {        doc.startElement(helper.getQName(f));              }      else      {        helper.populateNameInfo(nameInfo, f);        Element elem = document.createElementNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName());               handler.recordEObject(elem, remote, remote.eContainer(), f);        System.out.println("-->remote: "+elem.getNodeName()+": "+remote.eClass().getName()+"; "+f.getName());        elem.appendChild(document.createTextNode(href));        currentNode = currentNode.appendChild(elem);      }      EClass eClass = remote.eClass();      EClass expectedType = (EClass)f.getEType();      if (eClass != expectedType && (saveTypeInfo || expectedType.isAbstract()))      {        saveTypeAttribute(eClass);      }      if (!toDOM)      {        doc.endContentElement(href);      }      else      {        currentNode = currentNode.getParentNode();      }    }  }