if (NS_FAILED(rv))	return(rv);
InternetSearchDataSource::GetCategoryList(){	nsIRDFDataSource	*ds = nsnull;	nsresult rv = nsComponentManager::CreateInstance(kRDFXMLDataSourceCID,			nsnull, NS_GET_IID(nsIRDFDataSource), (void**) &ds);	if (NS_FAILED(rv))	return(rv);	if (!ds)		return(NS_ERROR_UNEXPECTED);	categoryDataSource = do_QueryInterface(ds);	NS_RELEASE(ds);	ds = nsnull;	if (!categoryDataSource)	return(NS_ERROR_UNEXPECTED);	nsCOMPtr<nsIRDFRemoteDataSource>	remoteCategoryDataSource = do_QueryInterface(categoryDataSource);	if (!remoteCategoryDataSource)	return(NS_ERROR_UNEXPECTED);	// get search.rdf	NS_WITH_SERVICE(nsIFileLocator, locator, kFileLocatorCID, &rv);	if (NS_FAILED(rv) || !locator)	return(NS_ERROR_FAILURE);	nsCOMPtr<nsIFileSpec>	dirSpec;	if (NS_FAILED(rv = locator->GetFileLocation(nsSpecialFileSpec::App_SearchFile50,		getter_AddRefs(dirSpec))))			return(rv);	nsFileSpec		fileSpec;	if (NS_FAILED(rv = dirSpec->GetFileSpec(&fileSpec)))	return(rv);	nsFileURL		fileURL(fileSpec);	if (NS_FAILED(rv = remoteCategoryDataSource->Init(fileURL.GetURLString())))	return(rv);	// synchronous read	rv = remoteCategoryDataSource->Refresh(PR_TRUE);	return(rv);}