aParent->ChildAt(0, *aResult); return;
nsCOMPtr<nsIContent> child; aParent->ChildAt(0, *getter_AddRefs(child));   nsCOMPtr<nsIAtom> tag; child->GetTag ( *getter_AddRefs(tag) ); if ( tag.get() == nsXULAtoms::Template ) { if ( count == 1 ) return; aParent->ChildAt(1, *getter_AddRefs(child)); }  *aResult = child; NS_IF_ADDREF(*aResult);
GetMenuChildrenElement(nsIContent* aParent, nsIContent** aResult){  *aResult = nsnull;  PRInt32 count;  aParent->ChildCount(count);  if (count == 0)    return;    aParent->ChildAt(0, *aResult);  return;}