else if (tagName == "a")
else if (tagName.EqualsWithConversion("a"))
nsHTMLEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList){  if (!aNodeList)    return NS_ERROR_NULL_POINTER;  nsresult res;  res = NS_NewISupportsArray(aNodeList);  if (NS_FAILED(res)) return res;  if (!*aNodeList) return NS_ERROR_NULL_POINTER;  nsCOMPtr<nsIContentIterator> iter;  res = nsComponentManager::CreateInstance(kCContentIteratorCID, nsnull,                                           NS_GET_IID(nsIContentIterator),                                            getter_AddRefs(iter));  if (!iter) return NS_ERROR_NULL_POINTER;  if ((NS_SUCCEEDED(res)))  {    // get the root content    nsCOMPtr<nsIContent> rootContent;    nsCOMPtr<nsIDOMDocument> domdoc;    nsEditor::GetDocument(getter_AddRefs(domdoc));    if (!domdoc)      return NS_ERROR_UNEXPECTED;    nsCOMPtr<nsIDocument> doc (do_QueryInterface(domdoc));    if (!doc)      return NS_ERROR_UNEXPECTED;    rootContent = doc->GetRootContent();    iter->Init(rootContent);    // loop through the content iterator for each content node    while (NS_ENUMERATOR_FALSE == iter->IsDone())    {      nsCOMPtr<nsIContent> content;      res = iter->CurrentNode(getter_AddRefs(content));      if (NS_FAILED(res))        break;      nsCOMPtr<nsIDOMNode> node (do_QueryInterface(content));      if (node)      {        nsAutoString tagName;        node->GetNodeName(tagName);        tagName.ToLowerCase();        // See if it's an image or an embed        if (tagName == "img" || tagName == "embed")          (*aNodeList)->AppendElement(node);        else if (tagName == "a")        {          // XXX Only include links if they're links to file: URLs          nsCOMPtr<nsIDOMHTMLAnchorElement> anchor (do_QueryInterface(content));          if (anchor)          {            nsAutoString href;            if (NS_SUCCEEDED(anchor->GetHref(href)))              if (href.Compare("file:", PR_TRUE, 5) == 0)                (*aNodeList)->AppendElement(node);          }        }      }      iter->Next();    }  }  return res;}