XULDocumentImpl::GetElementsByTagName(const nsString& aTagName, nsIDOMNodeList** aReturn)
XULDocumentImpl::GetElementsByTagName(nsIDOMNode* aNode, const nsString& aTagName, nsRDFDOMNodeList* aElements)
XULDocumentImpl::GetElementsByTagName(const nsString& aTagName, nsIDOMNodeList** aReturn){    nsresult rv;    nsRDFDOMNodeList* elements;    if (NS_FAILED(rv = nsRDFDOMNodeList::Create(&elements))) {        NS_ERROR("unable to create node list");        return rv;    }    nsIContent* root = GetRootContent();    NS_ASSERTION(root != nsnull, "no doc root");    if (root != nsnull) {        nsIDOMNode* domRoot;        if (NS_SUCCEEDED(rv = root->QueryInterface(nsIDOMNode::GetIID(), (void**) &domRoot))) {            rv = GetElementsByTagName(domRoot, aTagName, elements);            NS_RELEASE(domRoot);        }        NS_RELEASE(root);    }    *aReturn = elements;    return NS_OK;}