char *value = textFrags->Get1b();
const char *value = textFrags->Get1b();
XULSortServiceImpl::GetTreeCellValue(nsIContent *node, nsString & val){	PRBool			found = PR_FALSE;	PRInt32			childIndex = 0, numChildren = 0, nameSpaceID;        nsCOMPtr<nsIContent>	child;	nsresult		rv;	if (NS_FAILED(rv = node->ChildCount(numChildren)))	return(rv);	for (childIndex=0; childIndex<numChildren; childIndex++)	{		if (NS_FAILED(rv = node->ChildAt(childIndex, *getter_AddRefs(child))))	break;;		if (NS_FAILED(rv = child->GetNameSpaceID(nameSpaceID)))	break;		// XXX is this the correct way to get text?  Probably not...		if (nameSpaceID != kNameSpaceID_XUL)		{			nsITextContent	*text = nsnull;			if (NS_SUCCEEDED(rv = child->QueryInterface(kITextContentIID, (void **)&text)))			{				const nsTextFragment	*textFrags;				PRInt32		numTextFrags;				if (NS_SUCCEEDED(rv = text->GetText(textFrags, numTextFrags)))				{					char *value = textFrags->Get1b();					PRInt32 len = textFrags->GetLength();					val.SetString(value, len);					found = PR_TRUE;					break;				}			}		}	}	return((found == PR_TRUE) ? NS_OK : NS_ERROR_FAILURE);}