BookmarkParser parser();
BookmarkParser parser;
BookmarkDataSourceImpl::ReadBookmarks(void){    nsresult rv;    if (NS_FAILED(rv = rdf_MakeSeq(mInner, kNC_BookmarksRoot))) {        NS_ERROR("Unaboe to make NC:BookmarksRoot a sequence");        return rv;    }	nsSpecialSystemDirectory bookmarksFile(nsSpecialSystemDirectory::OS_CurrentProcessDirectory);	// XXX we should get this from prefs.    bookmarksFile += "res";    bookmarksFile += "rdf";    bookmarksFile += "bookmarks.html";	nsInputFileStream strm(bookmarksFile);	if (! strm.is_open()) {		NS_ERROR("unable to open file");		return NS_ERROR_FAILURE;	}	BookmarkParser parser;	parser.Init(&strm, NS_STATIC_CAST(nsIRDFDataSource *, this));	parser.Parse(kNC_BookmarksRoot);	// look for and import any IE Favorites	nsAutoString	ieTitle("Imported IE Favorites");#ifdef	XP_MAC	nsSpecialSystemDirectory ieFavoritesFile(nsSpecialSystemDirectory::Mac_PreferencesDirectory);	ieFavoritesFile += "Explorer";	ieFavoritesFile += "Favorites.html";	nsInputFileStream	ieStream(ieFavoritesFile);	if (strm.is_open())	{		nsCOMPtr<nsIRDFResource>	ieFolder;		if (NS_SUCCEEDED(rv = rdf_CreateAnonymousResource(kURINC_IEFavoritesRoot, getter_AddRefs(ieFolder))))		{			if (NS_SUCCEEDED(rv = rdf_MakeSeq(mInner, ieFolder)))			{				if (NS_SUCCEEDED(rv = mInner->Assert(ieFolder, kRDF_type, kNC_Folder, PR_TRUE)))				{					BookmarkParser parser();					parser.Init(&ieStream, this);					parser.Parse(ieFolder);										nsCOMPtr<nsIRDFLiteral>	ieTitleLiteral;					if (NS_SUCCEEDED(rv = mRDFService->GetLiteral(ieTitle, getter_AddRefs(ieTitleLiteral))))					{						rv = rdf_Assert(mInner, ieFolder, kURINC_Name, ieTitleLiteral);					}					if (NS_SUCCEEDED(rv = rdf_ContainerAppendElement(mInner, kNC_BookmarksRoot, ieFolder)))					{					}				}			}		}	}#endif#ifdef	XP_WIN	nsCOMPtr<nsIRDFResource>	ieFolder;	// XXX This usually works for Win95/98... need to be smarter (check registry?)	// XXX and do the right thing (whatever that is) for WinNT	if (NS_SUCCEEDED(rv = gRDFService->GetResource("file:///C|/WINDOWS/Favorites/", getter_AddRefs(ieFolder))))	{		nsCOMPtr<nsIRDFLiteral>	ieTitleLiteral;		if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(ieTitle, getter_AddRefs(ieTitleLiteral))))		{			rv = rdf_Assert(mInner, ieFolder, kURINC_Name, ieTitleLiteral);		}		if (NS_SUCCEEDED(rv = rdf_ContainerAppendElement(mInner, kNC_BookmarksRoot, ieFolder)))		{		}	}#endif	return NS_OK;	}