Welcome! Log In Create A New Profile

Advanced

[WD23] - Processing HTML

Posted by JP 
JP
[WD23] - Processing HTML
October 11, 2018 08:39AM
Hi All

I want to retrieve a website page which I can do using the HTML control. Is there a function which allows me to extract just the main body of the webpage, i.e. just extract the relevant text of the page which a user would see rather than all the html coding and formatting instructions, etc.?
Re: [WD23] - Processing HTML
October 11, 2018 11:14AM
Hi,

HTMLToText?

[help.windev.com]

Regards,
Darren.
Re: [WD23] - Processing HTML
October 11, 2018 06:46PM
Hi JP,

If you only want the body part then this will do the trick:
Procedure get_Body(sHTML)
sResult is string
sResult=ExtractString(sHTML,1,"</body>")
sResult=ExtractString(sResult,2,"<body>")
RESULT sResult
Kind regards,
Piet
JP
Re: [WD23] - Processing HTML
October 12, 2018 10:40AM
Darren and Piet,

Thanks, I have used those suggestions to get what I needed. Thanks.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: