Solved

twebbrowser save text, then remove link anchor text

Posted on 2006-11-23
4
391 Views
Last Modified: 2012-05-05
Hi all,

Does anybody know how to save the innertext of a website with twebbrowser to a memo, then get the anchor text of all the links from twebbrowser, then remove all instances of each anchor text from the memo.

Thanks
0
Comment
Question by:zattz
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
bernani earned 500 total points
ID: 18006458
Hi,

There is good package (freeware) at http://www.bsalsa.com/downloads.html

Download  one of the demo at http://www.bsalsa.com/Downloads/EmbeddedWBDemo_SC.zip

and you'll have all the required procedures to load/save/edit/see ... :

Page Source Html As Strings
Page Source Text As Strings
View Page Links As A List

...

procedure TfrmMain.PageSourceHtmlAsStrings1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageSourceHtmlToStrings(RichEditWB1.Lines);
   if RichEditWB1.HighlightHTML then
   RichEditWB1.DoHighlightHTML;
end;

procedure TfrmMain.PageSourceTextAsStrings1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageSourceTextToStrings(RichEditWB1.Lines);
end;

procedure TfrmMain.ViewPageLinksAsAList1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageLinksToStrings(RichEditWB1.Lines);
end;

procedure TfrmMain.ViewPageImagesAsAList1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageImagesToStrings(RichEditWB1.Lines);
end;

procedure TfrmMain.ViewPageFieldsAsAList1Click(Sender: TObject);
begin
   UpdateEditor;
   EmbeddedWB1.ViewPageFieldsToStrings(RichEditWB1.Lines);
end;

0
 

Author Comment

by:zattz
ID: 18006508
Unfortunatly there isnt a VCL.NET version
0
 
LVL 9

Expert Comment

by:bernani
ID: 18006589

Hi,

I didn't know your question was VCL.NET related.

I've uninstalled my D2005 version, so I can't check if the procedures can be adapted to a VCL.NET environnement.

I'll see if I can anyway find sth.  





0
 

Author Comment

by:zattz
ID: 18007153
I'm trying it out in win32 and it only lists the actual web links, not the anchor text
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question