I am using htmlparser (htmlparser.org) to re-write all the link's in a input String.
All i need to do is iterate over all the link tags (<a href=...
), that appear in the input String, grab their value, perform some regex to determine how they should be manipulated, and then update the link's href, target and onclick values accordingly.
I am not sure how exactly I can update only the select link elements in the input String, will leaving all other data in the input String untouched.
It seems like the htmlparser library can extract certain elements for manipulation but it can't manipulate elements in their original context, and the then return their updated values will maintaining the integrity of the original context.
Any help would be greatly appreciated.
Thanks