*aText = (found) ? outText.ToNewUnicode() : nsnull;
*aText = (found) ? ToNewUnicode(outText) : nsnull;
NS_IMETHODIMP DefaultTooltipTextProvider::GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval){  NS_ENSURE_ARG_POINTER(aNode);  NS_ENSURE_ARG_POINTER(aText);  nsString outText;  PRBool found = PR_FALSE;  nsCOMPtr<nsIDOMNode> current ( aNode );  while ( !found && current ) {    nsCOMPtr<nsIDOMElement> currElement ( do_QueryInterface(current) );    if ( currElement ) {      // first try the normal title attribute...      currElement->GetAttribute(NS_LITERAL_STRING("title"), outText);      if ( outText.Length() )        found = PR_TRUE;      else {        // ...ok, that didn't work, try it in the XLink namespace        currElement->GetAttributeNS(NS_LITERAL_STRING("http://www.w3.org/1999/xlink"), NS_LITERAL_STRING("title"), outText);        if ( outText.Length() )          found = PR_TRUE;      }    }        // not found here, walk up to the parent and keep trying    if ( !found ) {      nsCOMPtr<nsIDOMNode> temp ( current );      temp->GetParentNode(getter_AddRefs(current));    }  } // while not found  *_retval = found;  *aText = (found) ? outText.ToNewUnicode() : nsnull;  return NS_OK;}