baseDoc->SetXMLDeclaration(NS_LITERAL_STRING("1.0"), emptyString, emptyString);
baseDoc->SetXMLDeclaration(NS_LITERAL_STRING("1.0").get(), emptyString.get(), -1);
nsWebDAVService::CreatePropfindDocument(nsIURI *resourceURI,                                        nsIDOMDocument **requestDoc,                                        nsIDOMElement **propfindElt){    nsresult rv;    static NS_DEFINE_CID(kDOMDOMDOMDOMImplementationCID,                         NS_DOM_IMPLEMENTATION_CID);    nsCOMPtr<nsIDOMDOMImplementation>        implementation(do_CreateInstance(kDOMDOMDOMDOMImplementationCID, &rv));    NS_ENSURE_SUCCESS(rv, rv);    nsCOMPtr<nsIPrivateDOMImplementation>         privImpl(do_QueryInterface(implementation));    privImpl->Init(resourceURI);    nsCOMPtr<nsIDOMDocument> doc;    nsAutoString emptyString;    rv = implementation->CreateDocument(mDAVNSString, emptyString, nsnull,                                        getter_AddRefs(doc));    NS_ENSURE_SUCCESS(rv, rv);    nsCOMPtr<nsIDocument> baseDoc = do_QueryInterface(doc);    baseDoc->SetXMLDeclaration(NS_LITERAL_STRING("1.0"), emptyString,                               emptyString);    baseDoc->SetDocumentURI(resourceURI);    nsCOMPtr<nsIDOMElement> elt;    rv = NS_WD_AppendElementWithNS(doc, doc, mDAVNSString,                                   NS_LITERAL_STRING("propfind"),                                   getter_AddRefs(elt));    elt->SetPrefix(NS_LITERAL_STRING("D"));    NS_ENSURE_SUCCESS(rv, rv);    *requestDoc = doc.get();    NS_ADDREF(*requestDoc);    *propfindElt = elt.get();    NS_ADDREF(*propfindElt);    return NS_OK;}