result = env->NewStringUTF("");
result = ::util_NewStringUTF(env, "");
Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeToString(JNIEnv *env, jobject obj, jint nativeRDFNode){    nsCOMPtr<nsIRDFResource> currentResource =         (nsIRDFResource *) nativeRDFNode;    nsCOMPtr<nsIRDFNode> node;    nsCOMPtr<nsIRDFLiteral> literal;    jstring result = nsnull;    PRBool isContainer = PR_FALSE;    nsresult rv;    const PRUnichar *textForNode = nsnull;    rv = gRDFCU->IsContainer(gBookmarksDataSource, currentResource,                              &isContainer);    if (NS_FAILED(rv)) {        ::util_ThrowExceptionToJava(env, "Exception: nativeToString: Can't tell if RDFResource is container.");        return result;    }        if (isContainer) {        // It's a bookmarks folder        rv = gBookmarksDataSource->GetTarget(currentResource,                                             kNC_Name, PR_TRUE,                                              getter_AddRefs(node));        // get the name of the folder        if (rv == 0) {            // if so, make sure it's an nsIRDFLiteral            rv = node->QueryInterface(NS_GET_IID(nsIRDFLiteral),                                       getter_AddRefs(literal));            if (NS_SUCCEEDED(rv)) {                rv = literal->GetValueConst(&textForNode);            }            else {                printf("nativeToString: node is not an nsIRDFLiteral.\n");            }        }    }    else {        // It's a bookmark or a Separator        rv = gBookmarksDataSource->GetTarget(currentResource,                                             kNC_URL, PR_TRUE,                                              getter_AddRefs(node));        // See if it has a Name        if (0 != rv) {            rv = gBookmarksDataSource->GetTarget(currentResource,                                                 kNC_Name, PR_TRUE,                                                  getter_AddRefs(node));        }                if (0 == rv) {            rv = node->QueryInterface(NS_GET_IID(nsIRDFLiteral),                                       getter_AddRefs(literal));            if (NS_SUCCEEDED(rv)) {                // get the value of the literal                rv = literal->GetValueConst(&textForNode);                if (NS_FAILED(rv)) {                    printf("nativeToString: node doesn't have a value.\n");                }            }            else {                rdf_printArcLabels(currentResource);                printf("nativeToString: node is not an nsIRDFLiteral.\n");            }        }        else {            rdf_printArcLabels(currentResource);            printf("nativeToString: node doesn't have a URL.\n");        }    }    if (nsnull != textForNode) {        nsString * string = new nsString(textForNode);        int length = 0;        if (nsnull != string) {            length = string->Length();        }        result = env->NewString(textForNode, length);    }    else {        result = env->NewStringUTF("");    }    return result;}