else { Node text = document.createTextNode(content); if (DEBUG_DOM) { System.out.println(currentNode.getLocalName()+": "+text); } currentNode.appendChild(text); }
  protected void endSaveFeatures(EObject o, int elementType, String content)  {    if (processElementExtensions(o))    {      if (o instanceof AnyType)      {               helper.popContext();      }      if (!toDOM)      {        doc.endElement();      }    }    else    {      switch (elementType)      {        case EMPTY_ELEMENT:        {          if (!toDOM)          {            doc.endEmptyElement();          }          break;        }        case CONTENT_ELEMENT:        {          if (!toDOM)          {            doc.endContentElement(content);          }          else          {                        Node text = document.createTextNode(content);            if (DEBUG_DOM)            {              System.out.println(currentNode.getLocalName()+": "+text);            }            currentNode.appendChild(text);                             }          break;        }        default:        {          if (o instanceof AnyType)          {                   helper.popContext();          }          if (!toDOM)          {            doc.endElement();          }          break;        }      }    }    if (toDOM)    {      currentNode = currentNode.getParentNode();    }  }