Einzelnen Beitrag anzeigen

shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#2

Re: Saving Document XML Source from TWebbrowser

  Alt 9. Okt 2006, 18:10
Try this:
Delphi-Quellcode:
function Document_GetHTML(Document: IDispatch):string;
var
   ms: TStringStream;
begin
   Result := '';
   if Assigned(Document) then
   begin
      ms := TStringStream.Create(Result);
      try
         OleCheck((Document as IPersistStreamInit).Save(TStreamAdapter.Create(ms),False));
         Result := ms.DataString;
      finally
         ms.Free;
      end;
   end;
end;

ShowMessage(Document_GetHTML(Webbrowser1.Document));
Andreas
  Mit Zitat antworten Zitat