[Htmlparser-user] Can HTMLParser solve this problem ?
Brought to you by:
derrickoswald
From: <pre...@wi...> - 2006-04-11 12:39:05
|
Hi All, =20 Following is the requirement of my project =20 Requirement =20 I need to write a java proxy so that I have the handle to all the requests that are made to a particular site. This is so that I can charge the end user. I have written a java code which connects to a particular URL gets the HTML data and forwards the same to the client. =20 Problem area =20 I want to parse the HTML returned from the site requested by user and append or change the value of some tags eg =20 href=3D"http://groups.google.co.in/grphp?hl=3Den&tab=3Dwg&ie=3DUTF-8"> =20 To be changed to something like =20 href=3D"http://localhost:8080/pageRedirect?page=3D"http://groups.google.c= o.i n/grphp?hl=3Den&tab=3Dwg&ie=3DUTF-8 <http://localhost:8080/pageRedirect?page=3D%22http://groups.google.co.in/= g rphp?hl=3Den&tab=3Dwg&ie=3DUTF-8> ""> =20 So that the request is redirect back to my proxy server and I extract the value of the page parameter and forward the request. =20 Can I achieve this parsing and translation using HTML parser? Can you please provide me with any sample code? =20 Thanks & Regards Prerna Sawhney =20 |