Как получить текст HTML Документа из TWebBrowser без тегов
Материал из DRKB
uses mshtml, activex;
procedure GetHtmlCode(WebBrowser: TWebBrowser; FileName: string);
var
htmlDoc: IHtmlDocument2;
PersistFile: IPersistFile;
begin
htmlDoc := WebBrowser.document as IHtmlDocument2;
PersistFile := HTMLDoc as IPersistFile;
PersistFile.Save(StringToOleStr(FileName), True);
end;
Source: http://delphiworld.narod.ru
ID: 03496
var
Document: IHTMLDocument2;
begin
Document := WB.Document as IHtmlDocument2;
if Document <> nil then
Memo1.Text := (Document.all.Item(NULL, 0) as IHTMLElement).OuterHTML;
Source: http://delphiworld.narod.ru
ID: 03497