nsresult rv;
NS_NewDOMDocument(nsIDOMDocument** aInstancePtrResult,                  const nsString& aNamespaceURI,                   const nsString& aQualifiedName,                   nsIDOMDocumentType* aDoctype,                  nsIURI* aBaseURI){  // XXX Ignoring the namespace, qualified name, and doctype parameters for now  nsXMLDocument* doc = new nsXMLDocument(aBaseURI);  if (doc == nsnull)    return NS_ERROR_OUT_OF_MEMORY;  return doc->QueryInterface(kIDOMDocumentIID, (void**) aInstancePtrResult);}