nsCOMPtr<nsIAtom> tag; child->GetTag(getter_AddRefs(tag)); if (aTag == tag.get()) {
if (child->Tag() == aTag) {
GetImmediateChild(nsIContent* aContent, nsIAtom *aTag, nsIContent** aResult) {  *aResult = nsnull;  PRInt32 childCount = aContent->GetChildCount();  for (PRInt32 i = 0; i < childCount; i++) {    nsIContent *child = aContent->GetChildAt(i);    nsCOMPtr<nsIAtom> tag;    child->GetTag(getter_AddRefs(tag));    if (aTag == tag.get()) {      *aResult = child;      NS_ADDREF(*aResult);      return;    }  }  return;}