if(NS_SUCCEEDED(rv = node->QueryInterface(nsCOMTypeInfo<nsIDOMXULElement>::GetIID(), (void**)&xulElement)))
if(NS_SUCCEEDED(rv = node->QueryInterface(NS_GET_IID(nsIDOMXULElement), (void**)&xulElement)))
static nsresult ConvertDOMListToResourceArray(nsIDOMNodeList *nodeList, nsISupportsArray **resourceArray){	nsresult rv = NS_OK;	PRUint32 listLength;	nsIDOMNode *node;	nsIDOMXULElement *xulElement;	nsIRDFResource *resource;	if(!resourceArray)		return NS_ERROR_NULL_POINTER;	if(NS_FAILED(rv = nodeList->GetLength(&listLength)))		return rv;	if(NS_FAILED(NS_NewISupportsArray(resourceArray)))	{		return NS_ERROR_OUT_OF_MEMORY;	}	for(PRUint32 i = 0; i < listLength; i++)	{		if(NS_FAILED(nodeList->Item(i, &node)))			return rv;		if(NS_SUCCEEDED(rv = node->QueryInterface(nsCOMTypeInfo<nsIDOMXULElement>::GetIID(), (void**)&xulElement)))		{			if(NS_SUCCEEDED(rv = xulElement->GetResource(&resource)) && resource)			{				(*resourceArray)->AppendElement(resource);				NS_RELEASE(resource);			}			NS_RELEASE(xulElement);		}		NS_RELEASE(node);			}	return rv;}