Solved

twebbrowser save text, then remove link anchor text

Posted on 2006-11-23
4
394 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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