if (NS_FAILED(rv = child->QueryInterface(kIDOMNodeIID, (void**) getter_AddRefs(domNode)))) {
rv = child->QueryInterface(kIDOMNodeIID, (void**) getter_AddRefs(domNode)); if (NS_FAILED(rv)) {
RDFElementImpl::GetChildNodes(nsIDOMNodeList** aChildNodes){    nsresult rv;    nsRDFDOMNodeList* children;    if (NS_FAILED(rv = nsRDFDOMNodeList::Create(&children))) {        NS_ERROR("unable to create DOM node list");        return rv;    }    PRInt32 count;    if (NS_SUCCEEDED(rv = ChildCount(count))) {        for (PRInt32 index = 0; index < count; ++index) {            nsCOMPtr<nsIContent> child;            if (NS_FAILED(rv = ChildAt(index, *getter_AddRefs(child)))) {                NS_ERROR("unable to get child");                break;            }            nsCOMPtr<nsIDOMNode> domNode;            if (NS_FAILED(rv = child->QueryInterface(kIDOMNodeIID, (void**) getter_AddRefs(domNode)))) {                NS_WARNING("child content doesn't support nsIDOMNode");                continue;            }            if (NS_FAILED(rv = children->AppendNode(domNode))) {                NS_ERROR("unable to append node to list");                break;            }        }    }    *aChildNodes = children;    NS_ADDREF(*aChildNodes);    return NS_OK;}