I imagine there are several options here. 1) assuming you know the html is well formatted. And if you use the struts tags it is not necessarily well formatted (i.e. the base tag does not include a closing tag it renders as <base href="" ...> not <base href="".../>) you could simply run the html into jaxp....
2) use an object oriented framework to parse the html. Check out HTMLParser (http://htmlparser.sourceforge.net/) on sourceforge.net. This framework has grown up quite a bit and will probably at least assist you in what you want to do... Al -----Original Message----- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 9:56 AM To: user@struts.apache.org Subject: [OT] edit HTML code on fly using java Hi does any one know a class or utility in java which will allow to update or modify HTML code on the fly, Here is what i am trying to do, i have a filter which which intercepts the response before being send out to browser, depending on some condition i want to modify this response which is HTML code, and add some tags and modify some text and then send this modified response to the browser, Is there some utility which will help in doing this, i dont want to work with strings manipulation but some kind of class which will allow me to work with the HTML as XML file regards Ashish A$HI$H __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]