*result = NS_STATIC_CAST(nsIContent*, this);
*result = NS_STATIC_CAST(nsIStyledContent*, this); } else if (iid.Equals(nsIXMLContent::GetIID())) { *result = NS_STATIC_CAST(nsIXMLContent*, this);
RDFElementImpl::QueryInterface(REFNSIID iid, void** result){    if (! result)        return NS_ERROR_NULL_POINTER;    if (iid.Equals(nsIStyledContent::GetIID()) ||        iid.Equals(kIContentIID) ||        iid.Equals(kISupportsIID)) {        *result = NS_STATIC_CAST(nsIContent*, this);    }    else if (iid.Equals(nsIDOMXULElement::GetIID()) ||             iid.Equals(kIDOMElementIID) ||             iid.Equals(kIDOMNodeIID)) {        *result = NS_STATIC_CAST(nsIDOMElement*, this);    }    else if (iid.Equals(kIScriptObjectOwnerIID)) {        *result = NS_STATIC_CAST(nsIScriptObjectOwner*, this);    }    else if (iid.Equals(kIDOMEventReceiverIID)) {        *result = NS_STATIC_CAST(nsIDOMEventReceiver*, this);    }    else if (iid.Equals(kIJSScriptObjectIID)) {        *result = NS_STATIC_CAST(nsIJSScriptObject*, this);    }    else if (iid.Equals(nsIDOMXULTreeElement::GetIID()) &&             (mNameSpaceID == kNameSpaceID_XUL) &&             (mTag == kTreeAtom)) {        if (! mInnerXULElement) {            if ((mInnerXULElement = new nsXULTreeElement(this)) == nsnull)                return NS_ERROR_OUT_OF_MEMORY;        }        return mInnerXULElement->QueryInterface(iid, result);    }    else {        *result = nsnull;        return NS_NOINTERFACE;    }    // if we get here, we know one of the above IIDs was ok.    NS_ADDREF(this);    return NS_OK;}