rv = doc->StartDocumentLoad(kLoadAsData,
rv = doc->StartDocumentLoad("loadAsInteractiveData",
nsSyncLoadService::LoadLocalXBLDocument(nsIChannel* aChannel,                                        nsIDOMDocument** _retval){    *_retval = nsnull;    nsCOMPtr<nsIInputStream> in;    nsresult rv = aChannel->Open(getter_AddRefs(in));    if (NS_FAILED(rv)) {        return rv;    }    // Get uri and loadgroup    nsCOMPtr<nsIURI> docURI;    rv = aChannel->GetURI(getter_AddRefs(docURI));    NS_ENSURE_SUCCESS(rv, rv);    nsCOMPtr<nsILoadGroup> loadGroup;    rv = aChannel->GetLoadGroup(getter_AddRefs(loadGroup));    NS_ENSURE_SUCCESS(rv, rv);    // Create document and contentsink and set them up.    nsCOMPtr<nsIDocument> doc = do_CreateInstance(kXMLDocumentCID, &rv);    NS_ENSURE_SUCCESS(rv, rv);    // Do this after making sure the |channel->Open| succeeded (which it    // won't if the file doesn't exist) so that we don't have to go    // through the work of breaking the circular references between    // content sink, script loader, and document.    nsCOMPtr<nsIXMLContentSink> xblSink;    rv = NS_NewXBLContentSink(getter_AddRefs(xblSink), doc, docURI, nsnull);    NS_ENSURE_SUCCESS(rv, rv);    nsCOMPtr<nsIStreamListener> listener;    rv = doc->StartDocumentLoad(kLoadAsData,                                aChannel,                                loadGroup,                                nsnull,                                getter_AddRefs(listener),                                PR_TRUE,                                xblSink);    NS_ENSURE_SUCCESS(rv, rv);    rv = PushSyncStreamToListener(in, listener, aChannel);    NS_ENSURE_SUCCESS(rv, rv);    return CallQueryInterface(doc, _retval);}