aResult.AppendWithConversion(':');
aResult.Append(NS_LITERAL_STRING(":"));
nsXULContentUtils::GetElementLogString(nsIContent* aElement, nsString& aResult){    nsresult rv;    aResult.AssignWithConversion('<');    nsCOMPtr<nsINameSpace> ns;    PRInt32 elementNameSpaceID;    rv = aElement->GetNameSpaceID(elementNameSpaceID);    if (NS_FAILED(rv)) return rv;    if (kNameSpaceID_HTML == elementNameSpaceID) {        aResult.AppendWithConversion("html:");    }    else {        nsCOMPtr<nsIXMLContent> xml( do_QueryInterface(aElement) );        NS_ASSERTION(xml != nsnull, "not an XML or HTML element");        if (! xml) return NS_ERROR_UNEXPECTED;        rv = xml->GetContainingNameSpace(*getter_AddRefs(ns));        if (NS_FAILED(rv)) return rv;                nsCOMPtr<nsIAtom> prefix;        rv = ns->FindNameSpacePrefix(elementNameSpaceID, *getter_AddRefs(prefix));        if (NS_SUCCEEDED(rv) && (prefix != nsnull)) {            nsAutoString prefixStr;            prefix->ToString(prefixStr);            if (prefixStr.Length()) {                const PRUnichar *unicodeString;                prefix->GetUnicode(&unicodeString);                aResult.Append(unicodeString);                aResult.AppendWithConversion(':');            }        }    }    nsCOMPtr<nsIAtom> tag;    rv = aElement->GetTag(*getter_AddRefs(tag));    if (NS_FAILED(rv)) return rv;    const PRUnichar *unicodeString;    tag->GetUnicode(&unicodeString);    aResult.Append(unicodeString);    PRInt32 count;    rv = aElement->GetAttributeCount(count);    if (NS_FAILED(rv)) return rv;    for (PRInt32 i = 0; i < count; ++i) {        aResult.AppendWithConversion(' ');        PRInt32 nameSpaceID;        nsCOMPtr<nsIAtom> name, prefix;        rv = aElement->GetAttributeNameAt(i, nameSpaceID, *getter_AddRefs(name), *getter_AddRefs(prefix));        if (NS_FAILED(rv)) return rv;        nsAutoString attr;        nsXULContentUtils::GetAttributeLogString(aElement, nameSpaceID, name, attr);        aResult.Append(attr);        aResult.AppendWithConversion("=\"");        nsAutoString value;        rv = aElement->GetAttribute(nameSpaceID, name, value);        if (NS_FAILED(rv)) return rv;        aResult.Append(value);        aResult.AppendWithConversion("\"");    }    aResult.AppendWithConversion('>');    return NS_OK;}