By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,658 Members | 1,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,658 IT Pros & Developers. It's quick & easy.

Generating hyperlinks dynamically (replacing words with links)

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
Thank you very much, it seems to be very usefull !
Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.