int index = getIndex(namespaceURI, qualifiedName); if (index<0) {
boolean found = false; for (int i = 0; i < attrsEnd; i++) { AttrImpl attr = (AttrImpl)m_children[i]; if (attr.getLocalName().equals(attrImpl.getLocalName()) && attr.getNamespaceURI().equals(attrImpl.getNamespaceURI())) { m_children[i] = attrImpl; found = true; break; } } if (!found) {
  public Attr               createAttributeNS(String namespaceURI,                                              String qualifiedName)    throws DOMException  {    // System.out.println("qualifiedName: "+qualifiedName);    AttrImplNS attrImpl = new AttrImplNS(namespaceURI, qualifiedName, "");    int index = getIndex(namespaceURI, qualifiedName);    if (index<0)    {        appendChild(attrImpl);      attrsEnd++;    }      else      m_children[index] = attrImpl;    return (Attr)attrImpl;      }