In this weblog i am going to present Java code which uses api delivered by SAP portal to parse html contents from other websites.
The code described in this weblog extracts the content described in following picture
Create a Dynpage component using wizard inside NWDS or Eclipse.
Cut and pase the following code to your Dynpage component.
“); response.write(“”); response.write(parser.htmltext); } } }
Write a class that extends com.sapportals.portal.prt.util.html.parser.ParserVisitor. You don’t have to write any code, just cut and paste the following code.
Deploy you component inside portal and run it. You should get the following content.