Solved

twebbrowser save text, then remove link anchor text

Posted on 2006-11-23
4
395 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

623 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