nsCOMPtr<nsIRDFContainer>	container; if (NS_FAILED(rv = nsComponentManager::CreateInstance(kRDFContainerCID, nsnull, NS_GET_IID(nsIRDFContainer), getter_AddRefs(container)))) return(rv); if (NS_FAILED(rv = container->Init(mInner, argParent))) return(rv);
if (NS_FAILED(rv = container->RemoveElement(src, PR_TRUE))) return rv;
nsBookmarksService::deleteBookmarkItem(nsIRDFResource *src, nsISupportsArray *aArguments, PRInt32 parentArgIndex, nsIRDFResource *objType){	nsresult			rv;	nsCOMPtr<nsIRDFNode>		aNode;	if (NS_FAILED(rv = getArgumentN(aArguments, kNC_Parent,			parentArgIndex, getter_AddRefs(aNode))))		return(rv);	nsCOMPtr<nsIRDFResource>	argParent = do_QueryInterface(aNode);	if (!argParent)	return(NS_ERROR_NO_INTERFACE);	// make sure its an object of the correct type (bookmark, folder, separator, ...)	PRBool	isCorrectObjectType = PR_FALSE;	if (NS_FAILED(rv = mInner->HasAssertion(src, kRDF_type,			objType, PR_TRUE, &isCorrectObjectType)))		return(rv);	if (!isCorrectObjectType)	return(NS_ERROR_UNEXPECTED);	nsCOMPtr<nsIRDFContainer>	container;	if (NS_FAILED(rv = nsComponentManager::CreateInstance(kRDFContainerCID, nsnull,			NS_GET_IID(nsIRDFContainer), getter_AddRefs(container))))		return(rv);	if (NS_FAILED(rv = container->Init(mInner, argParent)))		return(rv);	if (NS_FAILED(rv = container->RemoveElement(src, PR_TRUE)))		return(rv);	return(rv);}