anElement->GetAttribute(namespaceID, pIDAtom, idValue);  NS_RELEASE(pIDAtom);
anElement->GetAttribute(namespaceID, kIdAtom, idValue);
XULDocumentImpl::SearchForNodeByID(const nsString& anID,                                    nsIContent* anElement,                                   nsIDOMNode** aReturn){    // See if we match.    nsIAtom* pIDAtom = NS_NewAtom("id");    PRInt32 namespaceID;    anElement->GetNameSpaceID(namespaceID);        nsString idValue;    anElement->GetAttribute(namespaceID, pIDAtom, idValue);    NS_RELEASE(pIDAtom);    if (idValue == anID)    {      nsCOMPtr<nsIDOMNode> pDomNode( do_QueryInterface(anElement) );      if (pDomNode)      {        *aReturn = pDomNode;        NS_ADDREF(*aReturn);      }      return;    }    // Walk children.    // XXX: Don't descend into closed tree items (or menu items or buttons?).    PRInt32 childCount;    anElement->ChildCount(childCount);    for (PRInt32 i = 0; i < childCount && !(*aReturn); i++)    {        nsIContent* pContent = nsnull;        anElement->ChildAt(i, pContent);        if (pContent)        {            SearchForNodeByID(anID, pContent, aReturn);            NS_RELEASE(pContent);        }    }}