|
-
Aug 3rd, 2006, 07:11 PM
#1
Thread Starter
Hyperactive Member
how to convert an html document to plain text?
Read the title thanks
Or how To Parse the source
-
Aug 3rd, 2006, 07:24 PM
#2
Frenzied Member
Re: how to convert an html document to plain text?
Html is plain text already. 
The simplest would be to replace all "<BR>" with vbCrLf.
Tables would be a bit more work.
Best is to first determine how the table looks (find which opening and closing tags belong to eachother) and then write it as text.
Plain text doesn't contain pictures so you can just leave the tags as they are or strip them to just the image's url.
It really depends to what extent you wish to convert the page and which data you want to keep.
-
Aug 3rd, 2006, 07:52 PM
#3
Thread Starter
Hyperactive Member
Re: how to convert an html document to plain text?
-
Aug 3rd, 2006, 07:54 PM
#4
Frenzied Member
Re: how to convert an html document to plain text?
-
Aug 3rd, 2006, 08:09 PM
#5
PowerPoster
Re: how to convert an html document to plain text?
http://www.vbforums.com/showpost.php...2&postcount=18
with the HTML Object Library you use .innerText to just get the Text (without all the HTML tags) or .innerHTML to get everything ..
Also see this for ideas on parsing the HTML ..
http://www.vbforums.com/showthread.p...85#post2525685
Rory
Last edited by rory; Aug 3rd, 2006 at 08:12 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|