471,618 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

How to read text rendered of html file

Hello
I need to read the rendered text of a html file. Does anybody know how to do
that?
Thanks
Jan 12 '06 #1
2 1948
Robin,
Your post is unclear. When you say you need to "read" the rendered text, do
you mean you need to capture the contents of an HTML page without the HTML
Tags?

If so, you can make a WebRequest for the page and strip out just the "text"
with a Regular Expression. Search for "HTML to TEXT" and you should find
some good resources.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Robin" wrote:
Hello
I need to read the rendered text of a html file. Does anybody know how to do
that?
Thanks

Jan 12 '06 #2
An HTML file *is* text. Are you referring to the text that appears in the
browser? To do that, you would have to parse the HTML. That would be quite a
difficult. There are a number of .Net HTML parsing libraries and articles on
how to do this out there, but none that I would trust. HTML is extremely
complex. The rules of HTML are complex, and there are quite a few HTML
documents out there that break the rules in various ways. As you are only
wanting to get the text displayed, your job would be a bit less difficult.
You could concentrate on only that aspect of the HTML, without having to
worry about the rest. Still, it is likely to be time-consuming and
frustrating to do.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"Robin" <@> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hello
I need to read the rendered text of a html file. Does anybody know how to
do
that?
Thanks

Jan 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by David Thomas | last post: by
2 posts views Thread by Julie | last post: by
3 posts views Thread by Mike | last post: by
4 posts views Thread by Finn Stampe Mikkelsen | last post: by
1 post views Thread by ZEDKYRIE | last post: by

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.