Question Read HTML

jongpau

Member
What version of OpenEdge are you using, what is the target OS and is it GUI or Character? Adding this information really helps to answer questions.

Assuming its GUI on Windows:
If all you need to do is show the web page then in a OpenEdge GUI window then you can add a Microsoft Web Browser control to your frame and navigate to the page
Code:
chCtrlFrame:WebBrowser:Navigate('www.google.com')
To get the html out of the control you can try accessing
Code:
chCtrlFrame:WebBrowser:Document:Body:InnerHTML
in a DocumentComplete trigger on the control.

You will have to check whether or not this gives you what you want and whether or not the content is complete - especially with web pages that actively update content on the fly, pages with forms etc.

HTH
 
What version of OpenEdge are you using, what is the target OS and is it GUI or Character? Adding this information really helps to answer questions.

Assuming its GUI on Windows:
If all you need to do is show the web page then in a OpenEdge GUI window then you can add a Microsoft Web Browser control to your frame and navigate to the page
Code:
chCtrlFrame:WebBrowser:Navigate('www.google.com')
To get the html out of the control you can try accessing
Code:
chCtrlFrame:WebBrowser:Document:Body:InnerHTML
in a DocumentComplete trigger on the control.

You will have to check whether or not this gives you what you want and whether or not the content is complete - especially with web pages that actively update content on the fly, pages with forms etc.

HTH


Check out: http://en.wikipedia.org/wiki/CURL
 

RealHeavyDude

Well-Known Member
There are a lot of ways to download a HTML page:

You can
  • Hard core code it in the 4GL ( http://www.oehive.org/node/1205 )
  • Use the Internet Explorer WebBrowser OCX control ( which might have some surprises for you in store )
  • Use the .NET objects if you are on some recent version of OpenEdge
  • Use another 3rd party HTTP client like wget or curl
Personally, if you are on Windows, I prefer the .NET objects.

Heavy Regards, RealHeavyDude.
 
Top