I am using the WebBrowser Control in my both Delphi and .Net C# test projects to navigate to a local test XML file and try to save the content back to a XML file in .Net D
You could do a "shadow" download of the file in the TWebBrowser BeforeNavigate2 event.
By shadow, I mean use a procedure from another library to download the file at the same time TWebBrowser is downloading it. This way, you can get the file without it being modified by TWebBrowser.
I wrote a test application and all I had to do the get the file contents is
procedure TForm1.WebBrowserBeforeNavigate2(Sender: TObject;
const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant; var Cancel: WordBool);
begin
HttpGetText(URL,Memo1.Lines);
end;
The HttpGetText is a blocking function from the Synapse library http://www.ararat.cz/synapse/doku.php/start
You could also use ICS, Indy, or TDownLoadURL. Note, TDownLoadURL is not blocking and I was never able to get its AfterDownload event to work.