Solved

twebbrowser save text, then remove link anchor text

Posted on 2006-11-23
4
389 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
Comment Utility
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
Comment Utility
Unfortunatly there isnt a VCL.NET version
0
 
LVL 9

Expert Comment

by:bernani
Comment Utility

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
Comment Utility
I'm trying it out in win32 and it only lists the actual web links, not the anchor text
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now