HTML to text question

  • Thread starter Thread starter MPR
  • Start date Start date
M

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
 
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,

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/d...html/cerefInternetExplorerMSHTMLDHTMLAPIs.asp

I hope this helps?

Cor
 
* "MPR said:
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@TK2MSFTNGP10>
 
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
 
Back
Top