on 04-05-2011 9:31 PM
Hello,
I was wondering if it is possible to read the content (HTML) behind a given URL using Web Dynpro ABAP. If so, are there any functions available to parse the HTML ? I have been asked to develop an application that requires going to a URL, reading the content, and formatting a table from that content for presentaion within Web Dynpro ABAP. The HTML of the URL is nothing more than a "Table of Contents" to existing documentation ( Word Documents )
Thank you for any help / advice you can provide
Larry
You can get the HTML returned in a table using fm RSFO_HTML_REQUEST2.
Once you have that, you can convert it to a string using any number of methods. CL_RSR_WWW_RENDERER=>TABLE_TO_STRING should work fine.
One option for parsing it would be to get it converted into an iXML object, but you might have to do quite a bit of manipulation first depending on what the html looks like. You can see more info here on iXML classes: [http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm]
Otherwise I would just make use of find statements with regex patterns to sort through the html.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>You can get the HTML returned in a table using fm RSFO_HTML_REQUEST2.
Good advice all around. I imagine RSFO_HTML_REQUEST2 works for this situation, but I'm not sure the status of that function module. It doesn't sound like something reusable from the NetWeaver layer. I would instead recommend the use of the class CL_HTTP_CLIENT.
I dont think so, as the rendering is not done in abap. I wish I could help you though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.