473,466 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Generating hyperlinks dynamically (replacing words with links)

Hello,

I've (parts of ) HTML documents and a list of words that I have to transform
as an hyperlinks, i.e. surround them with a "<a href="...">" "</a>".
A first simple approach is to parse the HTML, loop on each textual nodes and
then loop on each words and made a string replacement provided the fact that
the words isn't in some particular tags context (<title>, etc.).

It could work since my words list is quite small (less than 100 entries),
but it can grow. Do you know if there exists some components that can help
in this task ?
The next step would be to code some letters automata but I have no time for
this.

Thank you
Nov 16 '05 #1
2 1809
Jazzdrums wrote:
I've (parts of ) HTML documents and a list of words that I have to transform
as an hyperlinks, i.e. surround them with a "<a href="...">" "</a>".
A first simple approach is to parse the HTML, loop on each textual nodes and
then loop on each words and made a string replacement provided the fact that
the words isn't in some particular tags context (<title>, etc.).

It could work since my words list is quite small (less than 100 entries),
but it can grow. Do you know if there exists some components that can help
in this task ?
The next step would be to code some letters automata but I have no time for
this.


Hi Jazzdrums,

the Html Agility Pack will help you!

http://blogs.msdn.com/smourier/archi...6/04/8265.aspx

Cheers

Arne Janning
Nov 16 '05 #2
Thank you very much, it seems to be very usefull !
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Csaba Gabor | last post by:
There was a post in this newsgroup about a month back titled "DYNAMICALLY diable links with CSS", so I added two new words (plus a d) to reflect my interest... So I have a bunch of links...
4
by: bobdedogh | last post by:
can anyone add live hyperlinks to the sortable table made by the code supplied by Machi, or know of a simple alternative bob Machi wrote Mar 10 1999, 8:00 am >>>>>>>>>>>>>> .... Hello...
4
by: Seefor | last post by:
Hi, I want my text hyperlinks to have a dotted border underneath, so I did this which works fine: a, a:link, a:visited, a:hover, a:active { color: #000; text-decoration: none;
9
by: Viken Karaguesian | last post by:
Hello all, I'm making a calendar section in a website. Each month is its own page and navigated by Previous / Next links. I have it working now with standard hyperlinks, but I want to learn how...
1
by: Robin | last post by:
Hello! I'm having trouble with links and hyperlinks in MS Access 2003 - any help would be great! Question 1! The "insert hyperlink" icon opens a browser window, allows the user to browse...
0
by: Vlad Koby | last post by:
Hi All I have a strange problem on my portal. I have an email-blasting page on the portal that uses FreeTextBox to edit the message body. There is also a subject field and a couple of drop down...
11
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. ...
1
by: mforema | last post by:
Hi Everybody, I have an Access table with a field filled with outdated hyperlinks. I also have an excel spreadsheet that is the master list for these hyperlinks. The spreadsheet will be updated...
5
by: 1965 | last post by:
Hi,all. I want to extract all words ( not including punctuations) from a text and convert all individual words into hyperlinks directing a dictionary site. When clicking on any word will go to the...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.