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

HTML to text question

P: n/a
MPR
Hi guys;

I got HTML code assigned to a variable.
Actually what I got into the variable is the whole HTML code for a web page.

I want to save that HTML code to disk, but not as HTML, I wan to save it as
text, I mean, I want to emulate the File / Save As in the Internet
Explorer, but instead of save it as HTML I want to save it as a text file,
saving only the "displayable content" of the HTML.

hope u understand cause I know I gave a messy explanation

Thanks
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
One way is using MSHTML and parsing the html text for tags and their
values.
This might be less messy if you have a predifined and simple html format.

HTH
rawCoder
"MPR" <pe********@hotmail.com> wrote in message
news:O$***************@TK2MSFTNGP12.phx.gbl...
Hi guys;

I got HTML code assigned to a variable.
Actually what I got into the variable is the whole HTML code for a web page.
I want to save that HTML code to disk, but not as HTML, I wan to save it as text, I mean, I want to emulate the File / Save As in the Internet
Explorer, but instead of save it as HTML I want to save it as a text file,
saving only the "displayable content" of the HTML.

hope u understand cause I know I gave a messy explanation

Thanks

Nov 21 '05 #2

P: n/a
MPR,

Same answer as Rawcoder from me, however for me is always the problem, what
are people meaning with the text from an HTML page, because that can be a
very big mess. (To overcome that was the reason to create HTML)

Can you make that maybe more clear to me, so than next time I do not have
that question again when answering this kind of questions?

Here a link to MSHTML
http://msdn.microsoft.com/library/de...LDHTMLAPIs.asp

I hope this helps?

Cor
Nov 21 '05 #3

P: n/a
* "MPR" <pe********@hotmail.com> scripsit:
I got HTML code assigned to a variable.
Actually what I got into the variable is the whole HTML code for a web page.

I want to save that HTML code to disk, but not as HTML, I wan to save it as
text, I mean, I want to emulate the File / Save As in the Internet
Explorer, but instead of save it as HTML I want to save it as a text file,
saving only the "displayable content" of the HTML.


<URL:http://groups.google.com/groups?selm=ebXm3efoCHA.1976%40TK2MSFTNGP10>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4

P: n/a
> <URL:http://groups.google.com/groups?selm=ebXm3efoCHA.1976%40TK2MSFTNGP10>

Brrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Nov 21 '05 #5

P: n/a
* "Cor Ligthert" <no**********@planet.nl> scripsit:
<URL:http://groups.google.com/groups?selm=ebXm3efoCHA.1976%40TK2MSFTNGP10>


Brrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr


Great code, but very hard to understand.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #6

P: n/a
>Great code, but very hard to understand.
Use Mshtml, this is so from the content dependend code, it will never work
on as real page I make.

(However on that MSHTML will not work either)

:-)

Cor
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.