result = MatchElementId(aContent->GetChildAt(i), aUTF8Id, aId);
result = MatchElementId(aContent->GetChildAt(i), aId);
MatchElementId(nsIContent *aContent,               const nsACString& aUTF8Id, const nsAString& aId){  if (aContent->IsContentOfType(nsIContent::eHTML)) {    if (aContent->HasAttr(kNameSpaceID_None, nsHTMLAtoms::id)) {      nsAutoString value;      aContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::id, value);      if (aId.Equals(value)) {        return aContent;      }    }  }  else if (aContent->IsContentOfType(nsIContent::eELEMENT)) {    nsCOMPtr<nsIXMLContent> xmlContent = do_QueryInterface(aContent);    if (xmlContent) {      nsIAtom* value = xmlContent->GetID();      if (value && value->EqualsUTF8(aUTF8Id)) {        return aContent;      }    }  }  nsIContent *result = nsnull;  PRUint32 i, count = aContent->GetChildCount();  for (i = 0; i < count && result == nsnull; i++) {    result = MatchElementId(aContent->GetChildAt(i), aUTF8Id, aId);  }  return result;}